aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-05-09 13:02:55 +0300
committerJosé Valim <jose.valim@gmail.com>2010-05-09 13:02:55 +0300
commit06eaf27fffbd4e24c038ea40ee8d118b5b4f04df (patch)
tree113859f95a9fae7c67138f746da997fd9e91a2d2 /activesupport
parent6c2d974e152850b533dafc6654d0df7bddfbd4bf (diff)
parente1a0d86fe0355ddff8c86db0f42f3824ffe14c02 (diff)
downloadrails-06eaf27fffbd4e24c038ea40ee8d118b5b4f04df.tar.gz
rails-06eaf27fffbd4e24c038ea40ee8d118b5b4f04df.tar.bz2
rails-06eaf27fffbd4e24c038ea40ee8d118b5b4f04df.zip
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/CHANGELOG2
-rw-r--r--activesupport/lib/active_support/core_ext/date/calculations.rb1
2 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG
index 1e01cfc45f..6146cc6a97 100644
--- a/activesupport/CHANGELOG
+++ b/activesupport/CHANGELOG
@@ -1,5 +1,7 @@
*Rails 3.0.0 [beta 4/release candidate] (unreleased)*
+* Aliases Date#sunday to Date#end_of_week. [fxn]
+
* Backports Date#>> from 1.9 so that calculations do the right thing around the calendar reform. [fxn]
* Date#to_time handles properly years in the range 0..138. [fxn]
diff --git a/activesupport/lib/active_support/core_ext/date/calculations.rb b/activesupport/lib/active_support/core_ext/date/calculations.rb
index 2612dca93a..3038729d34 100644
--- a/activesupport/lib/active_support/core_ext/date/calculations.rb
+++ b/activesupport/lib/active_support/core_ext/date/calculations.rb
@@ -181,6 +181,7 @@ class Date
result = self + days_to_sunday.days
self.acts_like?(:time) ? result.end_of_day : result
end
+ alias :sunday :end_of_week
alias :at_end_of_week :end_of_week
# Returns a new Date/DateTime representing the start of the given day in next week (default is Monday).