aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-02-21 15:07:25 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-02-21 15:07:25 +0000
commita0455ecb43f57485b2bfc2805b3d9d39b0726798 (patch)
tree22d539476bf4c23a319159ef2acd1bba8e6e4641
parent6e84d82ce95a09f80f431b6c0a70900f9cb6a3da (diff)
downloadrails-a0455ecb43f57485b2bfc2805b3d9d39b0726798.tar.gz
rails-a0455ecb43f57485b2bfc2805b3d9d39b0726798.tar.bz2
rails-a0455ecb43f57485b2bfc2805b3d9d39b0726798.zip
Added some examples for the time calculations
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@736 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--activesupport/CHANGELOG11
1 files changed, 10 insertions, 1 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG
index f93e8c28e0..22e5ed8224 100644
--- a/activesupport/CHANGELOG
+++ b/activesupport/CHANGELOG
@@ -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: