Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Allows pass argument for `Time#prev_year` and `Time#next_year`. | bogdanvlviv | 2017-10-24 | 1 | -5/+9 |
| | |||||
* | Allows pass argument for `Time#prev_month` and `Time#next_month` | bogdanvlviv | 2017-10-24 | 1 | -5/+9 |
| | |||||
* | Allows pass argument for `Time#prev_day` and `Time#next_day` | bogdanvlviv | 2017-10-24 | 1 | -6/+6 |
| | |||||
* | [Active Support] require_relative => require | Akira Matsuda | 2017-10-21 | 1 | -1/+1 |
| | | | | This basically reverts 8da30ad6be34339124ba4cb4e36aea260dda12bc | ||||
* | [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment` | Koichi ITO | 2017-07-11 | 1 | -0/+1 |
| | |||||
* | Use frozen-string-literal in ActiveSupport | Kir Shatrov | 2017-07-09 | 1 | -0/+1 |
| | |||||
* | [Active Support] require => require_relative | Akira Matsuda | 2017-07-01 | 1 | -1/+1 |
| | |||||
* | Add next occur and previous occurred day of week API (#26600) | Shota Iguchi | 2017-05-30 | 1 | -0/+16 |
| | |||||
* | Fix copy_time_to: Copy nsec instead of usec | Josua Schmid | 2016-10-20 | 1 | -1/+1 |
| | | | | | | | | | | | | | `copy_time_to` is a helper function for date and time calculations. It's being used by `prev_week`, `next_week` and `prev_weekday` to keep the time fraction when jumping around between days. Previously the nanoseconds part was lost during the operation. This lead to problems in practice if you were using the `end_of_day` calculation. Resulting in the time fraction of `end_of_day` not being the same as next week's `end_of_day`. With this fix `copy_time_to` doesn't forget the `nsec` digits. | ||||
* | fix typo in `DateAndTime::Calculations#all_week` doc [ci skip] | yuuji.yaginuma | 2016-09-27 | 1 | -1/+1 |
| | | | | | `Date.week_start` does not exist. `Date.beginning_of_week` seems to be correct. Ref: #5339 | ||||
* | modernizes hash syntax in activesupport | Xavier Noria | 2016-08-06 | 1 | -20/+20 |
| | |||||
* | applies new string literal convention in activesupport/lib | Xavier Noria | 2016-08-06 | 1 | -1/+1 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Introduce Date#all_day | Henrik Nyh | 2016-05-11 | 1 | -0/+5 |
| | | | | | | | | | Useful for queries like: Item.where(created_at: Date.current.all_day) There was already a Time#all_day with the same behaviour, but for queries like the above, Date is more convenient. | ||||
* | Add missing require to try | Rafael Mendonça França | 2016-03-11 | 1 | -0/+2 |
| | |||||
* | Add `#on_weekday?` method to `Date`, `Time`, and `DateTime`. | Vipul A M | 2016-02-15 | 1 | -0/+5 |
| | |||||
* | Renamed ‘Return’ to ‘Returns’ [ci skip] | Ronak Jangir | 2015-09-28 | 1 | -1/+1 |
| | |||||
* | added examples to DateAndTime::Calculations [ci skip] | Julio Lopez | 2015-07-18 | 1 | -9/+34 |
| | |||||
* | Merge pull request #20049 from iamvery/patch-1 | Yves Senn | 2015-05-07 | 1 | -1/+13 |
|\ | | | | | | | Amend `next_week` documentation [ci skip] | ||||
| * | Add examples of Date and Time `next_week` usage | Jay Hayes | 2015-05-07 | 1 | -0/+7 |
|/ | | | | [skip ci] | ||||
* | Use Ruby's #include? to avoid relying on AS extension | Carlos Antonio da Silva | 2015-01-06 | 1 | -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 Claghorn | 2015-01-06 | 1 | -6/+16 |
| | | | | Date, Time, and DateTime | ||||
* | Add same_time option to #prev_week and #next_week for Date, Time, and DateTime | George Claghorn | 2015-01-06 | 1 | -17/+22 |
| | |||||
* | Add #on_weekend?, #next_weekday, and #prev_weekday methods to Date, Time, ↵ | George Claghorn | 2015-01-06 | 1 | -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 ranges | Dimko | 2013-12-03 | 1 | -0/+21 |
| | |||||
* | No need to use blocks here | Andrew White | 2013-08-04 | 1 | -11/+9 |
| | |||||
* | formatting | Jon Rowe | 2013-04-26 | 1 | -1/+1 |
| | |||||
* | better document `next_week` functionaility closes #9568 | Jon Rowe | 2013-04-26 | 1 | -5/+5 |
| | |||||
* | Fixed Typo | Prathamesh Sonpatki | 2013-04-04 | 1 | -1/+1 |
| | |||||
* | Date.beginning_of_week thread local and beginning_of_week application config ↵ | gregolsen | 2012-09-18 | 1 | -15/+34 |
| | | | | option added (default is Monday) | ||||
* | Remove unused variable | Rafael Mendonça França | 2012-08-26 | 1 | -1/+1 |
| | |||||
* | Refactored common date and time calculations. | Pan Thomakos | 2012-08-04 | 1 | -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. |