Ruby/Date/next
Материал из Wiki.crossplatform.ru
Версия от 18:00, 13 сентября 2010; ViGOur (Обсуждение | вклад)
next finds the next day but does not change date in-place.
# Add 61 days to a date: require "date" date = Date.new( 2006, 11, 8 ) puts (date + 61).to_s
What"s the next day?
require "date" date = Date.new( 2006, 11, 8 ) date.next.to_s # => "2006-11-09"