Permalink
Browse files

Added some examples for the time calculations

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@736 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 6e84d82 commit a0455ecb43f57485b2bfc2805b3d9d39b0726798 @dhh dhh committed Feb 21, 2005
Showing with 10 additions and 1 deletion.
  1. +10 −1 activesupport/CHANGELOG
View
@@ -1,4 +1,13 @@
-* Added Time::Calculations to ask for things like Time.now.tomorrow, Time.now.yesterday, Time.now.months_ago(4) #580 [DP|Flurin]
+* Added Time::Calculations to ask for things like Time.now.tomorrow, Time.now.yesterday, Time.now.months_ago(4) #580 [DP|Flurin]. Examples:
+
+ "Later today" => now.in(3.hours),
+ "Tomorrow morning" => now.tomorrow.change(:hour => 9),
+ "Tomorrow afternoon" => now.tomorrow.change(:hour => 14),
+ "In a couple of days" => now.tomorrow.tomorrow.change(:hour => 9),
+ "Next monday" => now.next_week.change(:hour => 9),
+ "In a month" => now.next_month.change(:hour => 9),
+ "In 6 months" => now.months_since(6).change(:hour => 9),
+ "In a year" => now.in(1.year).change(:hour => 9)
* Upgraded to breakpoint 92 which fixes:

0 comments on commit a0455ec

Please sign in to comment.