Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Allows pass argument for `Time#prev_year` and `Time#next_year`. | bogdanvlviv | 2017-10-24 | 1 | -0/+16 |
| | |||||
* | Allows pass argument for `Time#prev_month` and `Time#next_month` | bogdanvlviv | 2017-10-24 | 1 | -0/+24 |
| | |||||
* | Allows pass argument for `Time#prev_day` and `Time#next_day` | bogdanvlviv | 2017-10-24 | 1 | -0/+10 |
| | |||||
* | [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 |
| | |||||
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" | Matthew Draper | 2017-07-02 | 1 | -1/+0 |
| | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. | ||||
* | Enforce frozen string in Rubocop | Kir Shatrov | 2017-07-01 | 1 | -0/+1 |
| | |||||
* | Add more rubocop rules about whitespaces | Rafael Mendonça França | 2016-10-29 | 1 | -148/+148 |
| | |||||
* | Fix copy_time_to: Copy nsec instead of usec | Josua Schmid | 2016-10-20 | 1 | -1/+3 |
| | | | | | | | | | | | | | `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. | ||||
* | applies new string literal convention in activesupport/test | 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. | ||||
* | Add `#on_weekday?` method to `Date`, `Time`, and `DateTime`. | Vipul A M | 2016-02-15 | 1 | -0/+10 |
| | |||||
* | Add #prev_day and #next_day as counterparts to #yesterday and #tomorrow for ↵ | George Claghorn | 2015-01-06 | 1 | -0/+10 |
| | | | | 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 | -0/+15 |
| | |||||
* | Add #on_weekend?, #next_weekday, and #prev_weekday methods to Date, Time, ↵ | George Claghorn | 2015-01-06 | 1 | -0/+45 |
| | | | | | | | | | | | | | 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. | ||||
* | better document `next_week` functionaility closes #9568 | Jon Rowe | 2013-04-26 | 1 | -0/+5 |
| | |||||
* | Date.beginning_of_week thread local and beginning_of_week application config ↵ | gregolsen | 2012-09-18 | 1 | -0/+50 |
| | | | | option added (default is Monday) | ||||
* | Refactored common date and time calculations. | Pan Thomakos | 2012-08-04 | 1 | -0/+186 |
* 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. |