diff options
author | Andrew White <andrew.white@unboxed.co> | 2017-03-01 18:13:15 +0000 |
---|---|---|
committer | Andrew White <andrew.white@unboxed.co> | 2017-03-02 06:02:41 +0000 |
commit | b5af751508281483845d4323177b0aec98a11880 (patch) | |
tree | 56f4a6c7af3a0ed4934e89dbfc73e55fadbdf314 /activesupport/CHANGELOG.md | |
parent | b61a56541aecd7ac685d4f19d943177a3f1b465a (diff) | |
download | rails-b5af751508281483845d4323177b0aec98a11880.tar.gz rails-b5af751508281483845d4323177b0aec98a11880.tar.bz2 rails-b5af751508281483845d4323177b0aec98a11880.zip |
Update `DateTime#change` to support usec and nsec
Adding support for these options now allows us to update the
`DateTime#end_of` methods to match the equivalent `Time#end_of`
methods, e.g:
datetime = DateTime.now.end_of_day
datetime.nsec == 999999999 # => true
Fixes #21424.
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r-- | activesupport/CHANGELOG.md | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 0614cdaabd..2999820c42 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,15 @@ +* Update `DateTime#change` to support `:usec` and `:nsec` options. + + Adding support for these options now allows us to update the `DateTime#end_of` + methods to match the equivalent `Time#end_of` methods, e.g: + + datetime = DateTime.now.end_of_day + datetime.nsec == 999999999 # => true + + Fixes #21424. + + *Dan Moore*, *Andrew White* + * Add `ActiveSupport::Duration#before` and `#after` as aliases for `#until` and `#since` These read more like English and require less mental gymnastics to read and write. @@ -20,7 +32,7 @@ *Robin Dupret* (#28157) * In Core Extensions, make `MarshalWithAutoloading#load` pass through the second, optional - argument for `Marshal#load( source [, proc] )`. This way we don't have to do + argument for `Marshal#load( source [, proc] )`. This way we don't have to do `Marshal.method(:load).super_method.call(source, proc)` just to be able to pass a proc. *Jeff Latz* |