Skip to content

Commit

Permalink
remove unnecessary markup
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaydev committed Sep 21, 2011
1 parent 5deb664 commit f289404
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions railties/guides/source/active_support_core_extensions.textile
Expand Up @@ -3383,9 +3383,9 @@ Time.zone_default

# In Barcelona, 2010/03/28 02:00 <plus>0100 becomes 2010/03/28 03:00 <plus>0200 due to DST.
t = Time.local_time(2010, 3, 28, 1, 59, 59)
# => Sun Mar 28 01:59:59 <plus>0100 2010
# => Sun Mar 28 01:59:59 +0100 2010
t.advance(:seconds => 1)
# => Sun Mar 28 03:00:00 <plus>0200 2010
# => Sun Mar 28 03:00:00 +0200 2010
</ruby>

* If +since+ or +ago+ jump to a time that can't be expressed with +Time+ a +DateTime+ object is returned instead.
Expand All @@ -3402,7 +3402,7 @@ The method +all_day+ returns a range representing the whole day of the current t

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

<ruby>
now = Time.current
# => Mon, 09 Aug 2010 23:20:05 UTC <plus>00:00
# => Mon, 09 Aug 2010 23:20:05 UTC +00:00
now.all_week
# => Mon, 09 Aug 2010 00:00:00 UTC <plus>00:00..Sun, 15 Aug 2010 23:59:59 UTC <plus>00:00
now.all_month
Expand All @@ -3430,7 +3430,7 @@ Active Support defines +Time.current+ to be +Time.zone.now+ if there's a user ti
Time.zone_default
# => #<ActiveSupport::TimeZone:0x7f73654d4f38 @utc_offset=nil, @name="Madrid", ...>
Time.current
# => Fri, 06 Aug 2010 17:11:58 CEST <plus>02:00
# => Fri, 06 Aug 2010 17:11:58 CEST +02:00
</ruby>

Analogously to +DateTime+, the predicates +past?+, and +future?+ are relative to +Time.current+.
Expand All @@ -3441,7 +3441,7 @@ Use the +local_time+ class method to create time objects honoring the user time
Time.zone_default
# => #<ActiveSupport::TimeZone:0x7f73654d4f38 @utc_offset=nil, @name="Madrid", ...>
Time.local_time(2010, 8, 15)
# => Sun Aug 15 00:00:00 <plus>0200 2010
# => Sun Aug 15 00:00:00 +0200 2010
</ruby>

The +utc_time+ class method returns a time in UTC:
Expand Down

0 comments on commit f289404

Please sign in to comment.