February 2010
2 posts
Date manipulation
rubyquicktips: You can add or subtract days or month from a Date object: +(n): add n number of days -(n): subtract n number of days >>(n): add n number of months <<(n): subtract n number of months Here are some examples: $ irb >> date = Date.today # => #<Date: ...> >> date.to_s => "2010-01-26" >> tomorrow = date + 1 # => #<Date:...
Feb 12th
51 notes
Feb 10th