diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-07-05 08:39:30 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-07-05 08:39:30 -0600 |
commit | 64e3d1d79ba2e06722b5856c0ebdefafe82fe7cd (patch) | |
tree | ce984a3a3fa9d9a99dd582c8281aec94a0dcc9f9 /guides | |
parent | 099485119a270ec8adc00bf422744be61e8eca36 (diff) | |
download | rails-64e3d1d79ba2e06722b5856c0ebdefafe82fe7cd.tar.gz rails-64e3d1d79ba2e06722b5856c0ebdefafe82fe7cd.tar.bz2 rails-64e3d1d79ba2e06722b5856c0ebdefafe82fe7cd.zip |
Only reference time specific methods in the time section [ci skip]
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_support_core_extensions.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md index c8891c240e..9537d9718c 100644 --- a/guides/source/active_support_core_extensions.md +++ b/guides/source/active_support_core_extensions.md @@ -3672,9 +3672,9 @@ t.advance(seconds: 1) #### `Time.current` -Active Support defines `Time.current` to be today in the current time zone. That's like `Time.now`, except that it honors the user time zone, if defined. It also defines `Date.yesterday` and `Date.tomorrow`, and the instance predicates `past?`, `today?`, and `future?`, all of them relative to `Time.current`. +Active Support defines `Time.current` to be today in the current time zone. That's like `Time.now`, except that it honors the user time zone, if defined. It also defines the instance predicates `past?`, `today?`, and `future?`, all of them relative to `Time.current`. -When making Time comparisons using methods which honor the user time zone, make sure to use `Time.current` and `Date.current` instead of `Time.now` and `Date.today`. There are cases where the user time zone might be in the future compared to the system time zone, which `Date.today` uses by default. This means `Date.today` may equal `Date.yesterday`. +When making Time comparisons using methods which honor the user time zone, make sure to use `Time.current` instead of `Time.now`. There are cases where the user time zone might be in the future compared to the system time zone, which `Time.now` uses by default. This means `Time.now.to_date` may equal `Date.yesterday`. #### `all_day`, `all_week`, `all_month`, `all_quarter` and `all_year` |