Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Added beginning_of_minute support to core_ext calculations for Time and DateTime | Gagan Awhad | 2013-02-21 | 1 | -0/+8 |
| | |||||
* | Standardise the return value of `to_time` | Andrew White | 2013-01-21 | 1 | -1/+5 |
| | | | | | | | | | | | | | | | | | | | | | | This commit standardises the return value of `to_time` to an instance of `Time` in the local system timezone, matching the Ruby core and standard library behavior. The default form for `String#to_time` has been changed from :utc to :local but research seems to suggest the latter is the more common form. Also fix an edge condition with `String#to_time` where the string has a timezone offset in it and the mode is :local. e.g: # Before: >> "2000-01-01 00:00:00 -0500".to_time(:local) => 2000-01-01 05:00:00 -0500 # After: >> "2000-01-01 00:00:00 -0500".to_time(:local) => 2000-01-01 00:00:00 -0500 Closes #2453 | ||||
* | Remove assert_nothing_raised | Rafael Mendonça França | 2013-01-03 | 1 | -4/+2 |
| | |||||
* | Added ability to compare date/time with infinity | bUg | 2013-01-04 | 1 | -0/+9 |
| | | | | | | | | | | | | | | | | | Date, DateTime, Time and TimeWithZone can now be compared to infinity, so it's now possible to create ranges with one infinite bound and date/time object as another bound. Ex.: @range = Range.new(Date.today, Float::INFINITY) Also it's possible to check inclusion of date/time in range with conversion. Ex.: @range.include?(Time.now + 1.year) # => true @range.include?(DateTime.now + 1.year) # => true Ability to create date/time ranges with infinite bound is required for handling postgresql range types. | ||||
* | Deprecate obsolete Time to DateTime fallback methods | Andrew White | 2012-12-11 | 1 | -26/+38 |
| | | | | | | | The Time.time_with_datetime_fallback, Time.utc_time and Time.local_time methods were added to handle the limitations of Ruby's native Time implementation. Those limitations no longer apply so we are deprecating them in 4.0 and they will be removed in 4.1. | ||||
* | Add #seconds_until_end_of_day to DateTime and Time | Olek Janiszewski | 2012-11-29 | 1 | -0/+48 |
| | |||||
* | Refactored common date and time calculations. | Pan Thomakos | 2012-08-04 | 1 | -175/+7 |
| | | | | | | | | * 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. | ||||
* | Make Time#change work with offsets other than UTC or local | Andrew White | 2012-07-01 | 1 | -0/+31 |
| | | | | | Use Time.new to create times where the current offset is not zero or not in the local time zone - closes #4847 and #6651. | ||||
* | Add prev_quarter and next_quarter method in Time/Date/DateTime | paranoiase Kang | 2012-06-20 | 1 | -0/+13 |
| | |||||
* | Merge pull request #6376 from jgaskins/timestamp-microseconds | Jeremy Kemper | 2012-05-18 | 1 | -1/+3 |
|\ | | | | | Increase numeric-timestamp precision to nanoseconds | ||||
| * | Increase `AR#cache_key` precision to nanoseconds | Jamie Gaskins | 2012-05-19 | 1 | -1/+3 |
| | | |||||
* | | respect nsec in TimeWithZone | Vasiliy Ermolovich + Sergey Nartimov | 2012-05-18 | 1 | -33/+33 |
| | | | | | | | | | | | | | | | | | | | | | | when we pass fractional usec to Time methods we should use Rational instead of Float because of accuracy problem Time.local(2011,6,12,23,59,59,999999.999).nsec # => 999999998 Time.local(2011,6,12,23,59,59,Rational(999999999, 1000)).nsec # => 999999999 | ||||
* | | wrap time ranges with timezones, closes #6179 | Vasiliy Ermolovich | 2012-05-17 | 1 | -1/+9 |
|/ | |||||
* | added beginning_of_hour support to core_ext calculations for Time and DateTime | Mark J. Titorenko | 2012-05-04 | 1 | -0/+8 |
| | |||||
* | Merge pull request #4284 from mattdbridges/time_calculation_aliases | Xavier Noria | 2012-02-28 | 1 | -0/+18 |
|\ | | | | | Added aliases for prev_year, prev_month, and prev_week in Time and Date calculations | ||||
| * | Adding :last_week, :last_month, and :last_year aliases to Time and Date | Matt Bridges | 2012-02-21 | 1 | -0/+18 |
| | | | | | | | | core extensions | ||||
* | | Optional start_day argument for Time#all_week. | kennyj | 2012-02-06 | 1 | -0/+1 |
| | | | | | | | | Closes #4883 | ||||
* | | Deprecate DateTime.local_offset | brainopia | 2012-01-25 | 1 | -4/+4 |
|/ | |||||
* | use AS::TestCase as the base class | Aaron Patterson | 2012-01-05 | 1 | -1/+1 |
| | |||||
* | Nano seconds fraction of time is copied properly in Time#advance | Pawel Pierzchala | 2012-01-05 | 1 | -0/+5 |
| | | | | | | When day, month or year was passed, advance created a new time ignoring previous nsec fraction. Now nsec is passed through usec as a Rational number. | ||||
* | beginning_of_week extended in both Time and Date so that to return week ↵ | gregolsen | 2011-11-25 | 1 | -0/+20 |
| | | | | start based on start day that is monday by default | ||||
* | Merge pull request #3725 from marcandre/twz_eql | Yehuda Katz | 2011-11-22 | 1 | -0/+6 |
|\ | | | | | Fix inconsistencies with Time{WithZone}#{hash,eql?} | ||||
| * | Fix inconsistencies with Time{WithZone}#{hash,eql?} | Marc-Andre Lafortune | 2011-11-22 | 1 | -0/+6 |
| | | |||||
* | | Removed argument throwing warnings when running tests. | Henrik Hodne | 2011-11-06 | 1 | -13/+13 |
|/ | | | | | | | | The last argument to DateTime.new/civil is the Julian day number for when the calendar reform occured. DateTime ignores it if it's 0, and sets it to the default of DateTime::ITALY instead, so we could just leave it out. This also removes the warnings while running the ActiveSupport tests (there still are some for the setup though). | ||||
* | Add tests for fixes to Time.=== | Jeremy Evans | 2011-09-07 | 1 | -0/+3 |
| | |||||
* | Rename Time#whole_* to Time#all_* [thanks Pratik!] | David Heinemeier Hansson | 2011-06-13 | 1 | -10/+10 |
| | |||||
* | Added Time#whole_day/week/quarter/year as a way of generating ranges ↵ | David Heinemeier Hansson | 2011-06-13 | 1 | -0/+20 |
| | | | | (example: Event.where(created_at: Time.now.whole_week)) [DHH] | ||||
* | Fix marshal round-tripping of fractional seconds (Time#subsec). | Jason Weathered | 2011-04-17 | 1 | -0/+7 |
| | |||||
* | reverted tests deleted by 080345baca1076a9788d, refactored implementations ↵ | Diego Carrion | 2011-03-04 | 1 | -3/+13 |
| | | | | | | should not invalidate the validations Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Ruby 1.8.7+ provides to_date/to_datetime, AS just makes them public. | John Firebaugh | 2011-02-03 | 1 | -13/+3 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | implements weeks_ago and prev_week for Date/DateTime/Time [#5122 ↵ | Rob Zolkos & Xavier Noria | 2010-10-16 | 1 | -0/+18 |
| | | | | state:committed] | ||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -10/+10 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | removes deprecations of last_(month|year) from master, they will be ↵ | Xavier Noria | 2010-05-19 | 1 | -8/+0 |
| | | | | deprecated in 2.3 instead | ||||
* | defines prev_(month|year) in Date and Time to ease transition to 1.9, and ↵ | Xavier Noria | 2010-05-12 | 1 | -5/+13 |
| | | | | deprecates last_(month|year) | ||||
* | let Time.time_with_datetime_fallback handle properly years in the range 0..138 | Xavier Noria | 2010-05-05 | 1 | -0/+7 |
| | |||||
* | Ruby 1.9.2: marshaling round-trips Time#zone | Jeremy Kemper | 2010-03-28 | 1 | -12/+8 |
| | |||||
* | Time zone tests were right all along. | José Valim | 2010-03-28 | 1 | -4/+4 |
| | |||||
* | Ruby's marshaling of Time instances doesn't respect the zone [#4282 ↵ | Santiago Pastorino | 2010-03-27 | 1 | -2/+2 |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Time#- with a DateTime argument behaves the same as with a Time argument, ↵ | Geoff Buesing | 2010-01-27 | 1 | -0/+4 |
| | | | | i.e. returns the difference between self and arg as a Float [#3476 status:resolved] | ||||
* | Setting usec (and nsec for Ruby 1.9) on Time#end_of_* methods [#1255 ↵ | Hugo Peixoto | 2009-08-09 | 1 | -23/+23 |
| | | | | | | status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Remove 'core' fluff. Hookable ActiveSupport.load_all! | Jeremy Kemper | 2009-05-20 | 1 | -1/+1 |
| | |||||
* | Work around Float faux precision | Jeremy Kemper | 2009-04-30 | 1 | -4/+4 |
| | |||||
* | Fix dependencies revealed by testing in isolation | Jeremy Kemper | 2009-04-22 | 1 | -0/+1 |
| | |||||
* | Test cleanup | Geoff Buesing | 2009-04-05 | 1 | -3/+3 |
| | |||||
* | Enhance Time #since and #ago DST tests. | Geoff Buesing | 2009-03-29 | 1 | -16/+57 |
| | |||||
* | Time.local instances: Adding 24.hours across the DST boundary adds 24 hours ↵ | Michael Curtis | 2009-03-29 | 1 | -16/+16 |
| | | | | instead of one day [#2066 state:resolved] | ||||
* | Time#to_s(:rfc822) uses #formatted_offset instead of unreliable and ↵ | Zachary Zolton | 2009-02-09 | 1 | -0/+4 |
| | | | | non-standard %z directive [#1899 state:resolved] | ||||
* | Require mocha >= 0.9.0 for AS tests | Jeremy Kemper | 2008-11-22 | 1 | -74/+70 |
| | |||||
* | Fix indentation mismatch | Jeremy Kemper | 2008-11-07 | 1 | -1/+1 |
| | |||||
* | Enhance testing for fractional days and weeks. Update changelog. | gbuesing | 2008-10-13 | 1 | -0/+8 |
| |