aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-11-26 22:04:20 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-11-26 22:06:47 +0530
commit99ff8fdab54e1a3d9377d114d8f9e3e45e6824ac (patch)
treee53834e71f3e2b5a7e326504aefebed5064af99c
parentf7545216750693b90d59d7c39ea5789835dae9d2 (diff)
downloadrails-99ff8fdab54e1a3d9377d114d8f9e3e45e6824ac.tar.gz
rails-99ff8fdab54e1a3d9377d114d8f9e3e45e6824ac.tar.bz2
rails-99ff8fdab54e1a3d9377d114d8f9e3e45e6824ac.zip
minor doc changes
-rw-r--r--activesupport/lib/active_support/core_ext/date/calculations.rb6
-rw-r--r--railties/guides/source/active_support_core_extensions.textile2
2 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/date/calculations.rb b/activesupport/lib/active_support/core_ext/date/calculations.rb
index 0c4081aa8d..8e7682ae12 100644
--- a/activesupport/lib/active_support/core_ext/date/calculations.rb
+++ b/activesupport/lib/active_support/core_ext/date/calculations.rb
@@ -193,9 +193,9 @@ class Date
alias :monday :beginning_of_week
alias :at_beginning_of_week :beginning_of_week
- # Returns a new +Date+/+DateTime+ representing the end of this week, week
- # starts on +start_day+, default is +:monday+. +DateTime+ objects have their
- # time set to 23:59:59).
+ # Returns a new +Date+/+DateTime+ representing the end of this week. Week is
+ # assumed to start on +start_day+, default is +:monday+. +DateTime+ objects
+ # have their time set to 23:59:59.
def end_of_week(start_day = :monday)
days_to_end = 6 - days_to_week_start(start_day)
result = self + days_to_end.days
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index d601e9ea29..6c95a01a0e 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -3041,7 +3041,7 @@ h6. +beginning_of_week+, +end_of_week+
The methods +beginning_of_week+ and +end_of_week+ return the dates for the
beginning and end of the week, respectively. Weeks are assumed to start on
-Monday, but that can be changed passing an argument, see examples:
+Monday, but that can be changed passing an argument.
<ruby>
d = Date.new(2010, 5, 8) # => Sat, 08 May 2010