Ruby/Time/year

Материал из Wiki.crossplatform.ru

(Различия между версиями)
Перейти к: навигация, поиск

Версия 17:10, 26 мая 2010

retrieve the year, the month, and the timezone

stop = Time.local( 20, 15, 1, 30, "jan", 2007, 2, 30, false, "MST")
stop.year # => 2007
stop.month # => 1 (January)
stop.zone # timezone => "MST" or Mountain Standard Time