diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-07-05 08:34:20 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-07-05 08:34:20 -0600 |
commit | 099485119a270ec8adc00bf422744be61e8eca36 (patch) | |
tree | 1dc7d253458dca4d28487b27f67d19616eadf177 /guides | |
parent | 8856ab00025f1c650051aef62ddd4ae866294e98 (diff) | |
download | rails-099485119a270ec8adc00bf422744be61e8eca36.tar.gz rails-099485119a270ec8adc00bf422744be61e8eca36.tar.bz2 rails-099485119a270ec8adc00bf422744be61e8eca36.zip |
Remove *all* references to `Time.yesterday` [ci skip]
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_support_core_extensions.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md index 36c8301150..c8891c240e 100644 --- a/guides/source/active_support_core_extensions.md +++ b/guides/source/active_support_core_extensions.md @@ -3672,7 +3672,7 @@ 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 `Time.yesterday` and `Time.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 `Date.yesterday` and `Date.tomorrow`, and 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`. |