aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/date_and_time
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2016-04-291-2/+2
|\ | | | | | | | | Conflicts: guides/source/configuring.md
| * [ci skip] Aline results of code examples in commentsyui-knk2016-04-201-2/+2
| |
* | Add require of mattr_accessor since Compatibility relies on it.Jason Frey2016-04-251-0/+2
| | | | | | | | | | Follow up to https://github.com/rails/rails/commit/c9c5788a527b70d7f983e2b4b47e3afd863d9f48
* | Follow up of ↵Vipul A M2016-04-241-4/+4
| | | | | | | | | | | | https://github.com/rails/rails/commit/c9c5788a527b70d7f983e2b4b47e3afd863d9f48 [ci skip]
* | Add compatibility for Ruby 2.4 `to_time` changesAndrew White2016-04-231-0/+16
|/ | | | | | | | | | | | | | | In Ruby 2.4 the `to_time` method for both `DateTime` and `Time` will preserve the timezone of the receiver when converting to an instance of `Time`. Since Rails 5.0 will support Ruby 2.2, 2.3 and later we need to introduce a compatibility layer so that apps that upgrade do not break. New apps will have a config initializer file that defaults to match the new Ruby 2.4 behavior going forward. For information about the changes to Ruby see: https://bugs.ruby-lang.org/issues/12189 https://bugs.ruby-lang.org/issues/12271 Fixes #24617.
* Add missing require to tryRafael Mendonça França2016-03-111-0/+2
|
* Add `#on_weekday?` method to `Date`, `Time`, and `DateTime`.Vipul A M2016-02-151-0/+5
|
* Renamed ‘Return’ to ‘Returns’ [ci skip]Ronak Jangir2015-09-281-1/+1
|
* Improving `in_time_zone` docs [ci skip]amitkumarsuroliya2015-09-131-2/+1
| | | `DateTime.utc` is not a valid method. It gives `NoMethodError: undefined method `utc` for DateTime:Class`. As we know that we can calculate `utc` time from `Time` Class, but we can’t calculate `utc` time from `DateTime` Class.
* added examples to DateAndTime::Calculations [ci skip]Julio Lopez2015-07-181-9/+34
|
* Revert "Replace use of alias chains with prepend at core_ext/date and ↵Roque Pinel2015-05-291-23/+0
| | | | core_ext/time"
* Merge pull request #19878 from pabloh/replace_alias_chains_with_prependRafael Mendonça França2015-05-281-0/+23
|\ | | | | Replace use of alias chains with prepend at core_ext/date and core_ext/time
| * Replace use of alias chains with prepend at core_ext/datePablo Herrero2015-05-041-0/+23
| |
* | Merge pull request #20049 from iamvery/patch-1Yves Senn2015-05-071-1/+13
|\ \ | |/ |/| | | Amend `next_week` documentation [ci skip]
| * Add examples of Date and Time `next_week` usageJay Hayes2015-05-071-0/+7
|/ | | | [skip ci]
* Use Ruby's #include? to avoid relying on AS extensionCarlos Antonio da Silva2015-01-061-1/+1
| | | | | | | | The build has failed when running the date/time ext tests in isolation due to the missing extension, so better than adding a require is using just Ruby in this case. https://travis-ci.org/rails/rails/jobs/46107954#L1077
* Add #prev_day and #next_day as counterparts to #yesterday and #tomorrow for ↵George Claghorn2015-01-061-6/+16
| | | | Date, Time, and DateTime
* Add same_time option to #prev_week and #next_week for Date, Time, and DateTimeGeorge Claghorn2015-01-061-17/+22
|
* Add #on_weekend?, #next_weekday, and #prev_weekday methods to Date, Time, ↵George Claghorn2015-01-061-0/+25
| | | | | | | | | | | | | and DateTime `#on_weekend?` returns true if the receiving date/time falls on a Saturday or Sunday. `#next_weekday` returns a new date/time representing the next day that does not fall on a Saturday or Sunday. `#prev_weekday` returns a new date/time representing the previous day that does not fall on a Saturday or Sunday.
* Added Date#all_week/month/quarter/year for generating date rangesDimko2013-12-031-0/+21
|
* No need to use blocks hereAndrew White2013-08-041-11/+9
|
* Refactor Date, Time, DateTime timezone methodsGilad Zohari2013-08-011-0/+41
| | | | | | Similar implementations of #in_time_zone exists for Date, Time and DateTime so method is extracted into its own module. Also some logic is extracted into private method.
* formattingJon Rowe2013-04-261-1/+1
|
* better document `next_week` functionaility closes #9568Jon Rowe2013-04-261-5/+5
|
* Fixed TypoPrathamesh Sonpatki2013-04-041-1/+1
|
* Date.beginning_of_week thread local and beginning_of_week application config ↵gregolsen2012-09-181-15/+34
| | | | option added (default is Monday)
* Remove unused variableRafael Mendonça França2012-08-261-1/+1
|
* Refactored common date and time calculations.Pan Thomakos2012-08-041-0/+213
* Added the `DateAndTime::Calculations` module that is included in Time and Date. It houses common calculations to reduce duplicated code. * Simplified and cleaned-up the calculation code. * Removed duplication in tests by adding a behavior module for shared tests. I also added some missing tests.