RosettaCodeData/Task/Date-manipulation/Ruby/date-manipulation-2.rb

4 lines
70 B
Ruby
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
new = t + 12.hours
new = t.in(12.hours)
new = t.advance(:hours => 12)