Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Return local time for backwards compatibility | Andrew White | 2013-07-09 | 1 | -8/+25 |
| | |||||
* | Retain offset and fraction when using Time.at_with_coercion | Andrew White | 2013-07-09 | 1 | -0/+37 |
| | | | | | | | | | | | | | | | | The standard Ruby behavior for Time.at is to return the same type of time when passing an instance of Time as a single argument. Since the an ActiveSupport::TimeWithZone instance may be a different timezone than the system timezone and DateTime just understands offsets the best we can do is to return an instance of Time with the correct offset. It also maintains the correct fractional second value as well. Fixes #11350. Backports: 484253515c0e05760541dc48946361185c9e6904 1b3873730b96035a238dbff7627bd5942e6dc4e7 | ||||
* | Override Time.at to work with Time-like values | Andrew White | 2013-06-08 | 1 | -0/+22 |
| | | | | | | | Time.at allows passing a single Time argument which is then converted to an integer. The conversion code since 1.9.3r429 explicitly checks for an instance of Time so we need to override it to allow DateTime and ActiveSupport::TimeWithZone values. | ||||
* | Wrap time ranges with timezones, closes #8807 | Vasiliy Ermolovich | 2013-01-08 | 1 | -30/+38 |
| | | | | | | | | | | | | | (cherry picked from commit e2e513621d732abb8efff9120bd9a444836720d6) (cherry picked from commit dcdde7da481e11660634278a8004175a1ce20f39) Backport of #6183, original issue was #6179 Conflicts: activesupport/lib/active_support/core_ext/time/calculations.rb activesupport/test/core_ext/time_ext_test Signed-off-by: Andrew White <andyw@pixeltrix.co.uk> | ||||
* | Add :nsec format only for Ruby 1.9 | Carlos Antonio da Silva | 2012-12-11 | 1 | -9/+9 |
| | | | | | | Ruby 1.8 does not support this format in Time, so the format will only be added to the available date formats on Ruby 1.9. Changelog entry was changed to explain that as well. | ||||
* | Merge pull request #6376 from jgaskins/timestamp-microseconds | Jeremy Kemper | 2012-12-10 | 1 | -1/+3 |
| | | | | | | Increase numeric-timestamp precision to nanoseconds Conflicts: activesupport/lib/active_support/core_ext/time/conversions.rb | ||||
* | added beginning_of_hour support to core_ext calculations for Time and DateTime | Mark J. Titorenko | 2012-05-04 | 1 | -0/+8 |
| | |||||
* | GH #4883. Optional start_day argument for Time#all_week | kennyj | 2012-02-05 | 1 | -0/+1 |
| | |||||
* | 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 |
| | |||||
* | Fixed Time#end_of_quarter to not blow up on May 31st [#313 state:resolved] | Carlos Brando | 2008-09-19 | 1 | -0/+1 |
| | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Add thorough tests for Time-object #past?, #future? and #today. Fix ↵ | gbuesing | 2008-09-14 | 1 | -10/+65 |
| | | | | TimeWithZone #today? to use #time instead of #utc for date comparison. Update changelog. [#720 state:resolved] | ||||
* | Introduce convenience methods past?, today? and future? for Date and Time ↵ | Clemens Kofler | 2008-09-14 | 1 | -6/+19 |
| | | | | classes to facilitate Date/Time comparisons. | ||||
* | Don't run 32bit dependant assertions in 64bit environments | Tarmo Tänav | 2008-09-04 | 1 | -4/+10 |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Fix Ruby's Time marshaling bug in pre-1.9 versions of Ruby: utc instances ↵ | Luca Guidi | 2008-08-27 | 1 | -0/+34 |
| | | | | are now correctly unmarshaled with a utc zone instead of the system local zone [#900 state:resolved] | ||||
* | If it doesn't overflow, it won't have a .start method. So don't run the ↵ | Michael Koziarski | 2008-07-20 | 1 | -1/+1 |
| | | | | second assertion either | ||||
* | Handle the case where 64bit time_t won't overflow. | Michael Koziarski | 2008-07-20 | 1 | -1/+6 |
| | |||||
* | Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ↵ | Joshua Peek | 2008-06-03 | 1 | -14/+14 |
| | | | | ActiveSupport [#238 state:resolved] | ||||
* | Time#since behaves correctly when passed a Duration. Closes #11527 [kemiller] | gbuesing | 2008-04-12 | 1 | -2/+53 |
| | |||||
* | Time #yesterday and #tomorrow behave correctly crossing DST boundary. Closes ↵ | Geoff Buesing | 2008-04-04 | 1 | -0/+52 |
| | | | | | | #7399 [sblackstone] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9221 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | test_time_with_datetime_fallback expects DateTime.local_offset instead of ↵ | Geoff Buesing | 2008-03-10 | 1 | -2/+2 |
| | | | | | | DateTime.now.offset git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9002 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Adding Time#end_of_day, _quarter, _week, and _year. Closes #9312. | Jeremy Kemper | 2008-02-27 | 1 | -0/+35 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de |