Skip to content

Commit

Permalink
Prefer Time.current over Time.now on example code
Browse files Browse the repository at this point in the history
  • Loading branch information
smartinez87 authored and fxn committed Jun 18, 2011
1 parent 9387c70 commit 899c736
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions railties/guides/source/active_support_core_extensions.textile
Expand Up @@ -3359,7 +3359,7 @@ h5. +all_day+, +all_week+, +all_month+, +all_quarter+ and +all_year+
The method +all_day+ returns a range representing the whole day of the current time.

<ruby>
now = Time.now
now = Time.current
# => Mon, 09 Aug 2010 23:20:05 UTC +00:00
now.all_day
# => Mon, 09 Aug 2010 00:00:00 UTC +00:00..Mon, 09 Aug 2010 23:59:59 UTC +00:00
Expand All @@ -3368,7 +3368,7 @@ now.all_day
Analogously, +all_week+, +all_month+, +all_quarter+ and +all_year+ all serve the purpose of generating time ranges.

<ruby>
now = Time.now
now = Time.current
# => Mon, 09 Aug 2010 23:20:05 UTC +00:00
now.all_week
# => Mon, 09 Aug 2010 00:00:00 UTC +00:00..Sun, 15 Aug 2010 23:59:59 UTC +00:00
Expand Down

0 comments on commit 899c736

Please sign in to comment.