diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2013-10-11 13:05:29 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2013-10-11 13:05:29 -0700 |
commit | 365110196afcf952bc22729d4467d579b708328f (patch) | |
tree | 7525a43f663b790929004b504ad92f9cb4d5b63f /guides | |
parent | cc362fe17b9a3e4be34a6a5a9f97f9c271bd7513 (diff) | |
download | rails-365110196afcf952bc22729d4467d579b708328f.tar.gz rails-365110196afcf952bc22729d4467d579b708328f.tar.bz2 rails-365110196afcf952bc22729d4467d579b708328f.zip |
Revert "Merge pull request #12480 from iwiznia/master"
This reverts commit e5f5a838b96a362534d9bb60d02334439ed9784c, reversing
changes made to d7567f3290a50952494e9213556a1f283a6cf3a0.
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_support_core_extensions.md | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md index d11c17117e..d3f49b19fa 100644 --- a/guides/source/active_support_core_extensions.md +++ b/guides/source/active_support_core_extensions.md @@ -3699,21 +3699,6 @@ Time.utc(1582, 10, 3) + 5.days # => Mon Oct 18 00:00:00 UTC 1582 ``` -When addinng or substracting durations, the resulting duration will be equivalent to subsequent calls to since or advance, so: - -```ruby -Date.new(2013,1,28) + 1.month + 1.month -# => Thu, 28 Mar 2013 -``` - -If you want to add durations and then use them as just one call to since or advance, you can use the flatten or flatten! method: - -```ruby -Date.new(2013,1,31) + (1.month + 1.month).flatten -# => Sun, 31 Mar 2013 -``` - - Extensions to `File` -------------------- |