Ruby/Time/Convert to Integer
Материал из Wiki.crossplatform.ru
Версия от 17:10, 26 мая 2010; (Обсуждение)
Convert Time objects to an integer representing the number of seconds since the Unix time epoch:
puts Time.gm(2007, 05).to_i
Личные инструменты |
ПросмотрыRuby/Time/Convert to IntegerМатериал из Wiki.crossplatform.ruВерсия от 17:10, 26 мая 2010; (Обсуждение)
Convert Time objects to an integer representing the number of seconds since the Unix time epoch:puts Time.gm(2007, 05).to_i |