Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Added `ActiveSupport::TimeWithZone#to_r` for `Time#at` compatibility. | stopdropandrew | 2013-02-24 | 1 | -0/+11 |
| | |||||
* | Added beginning_of_minute support to core_ext calculations for Time and DateTime | Gagan Awhad | 2013-02-21 | 1 | -0/+14 |
| | |||||
* | Modify TimeWithZone#as_json to return 3DP of sub-second accuracy by default, ↵ | James Harton | 2013-01-31 | 1 | -1/+1 |
| | | | | since it's allowed by the spec and is very useful. | ||||
* | 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/+12 |
| | | | | | | | | | | | | | | | | | 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. | ||||
* | Beef up tests for String#in_time_zone and Date#in_time_zone | Andrew White | 2012-12-11 | 1 | -0/+128 |
| | |||||
* | respect nsec in TimeWithZone | Vasiliy Ermolovich + Sergey Nartimov | 2012-05-18 | 1 | -0/+8 |
| | | | | | | | | | | | 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 | ||||
* | Merge pull request #6169 from marcandre/respond_to_missing | José Valim | 2012-05-05 | 1 | -0/+1 |
|\ | | | | | Respond to missing | ||||
| * | Use respond_to_missing for TimeWithZone | Marc-Andre Lafortune | 2012-05-05 | 1 | -0/+1 |
| | | |||||
* | | Merge pull request #6156 from mjtko/feature-beginning_of_hour | Jeremy Kemper | 2012-05-04 | 1 | -0/+14 |
|\ \ | | | | | | | Beginning and end of hour support for Time and DateTime | ||||
| * | | added beginning_of_hour support to core_ext calculations for Time and DateTime | Mark J. Titorenko | 2012-05-04 | 1 | -0/+14 |
| |/ | |||||
* / | enable tests for beginning_of_* and end_of_* within time zone tests; enable ↵ | Mark J. Titorenko | 2012-05-04 | 1 | -8/+8 |
|/ | | | | test for future_with_time_current_as_time_with_zone; fix beginning_of_month test. | ||||
* | use AS::TestCase as the base class | Aaron Patterson | 2012-01-05 | 1 | -2/+2 |
| | |||||
* | Initial pass at removing dead 1.8.x code from Active Support. | José Valim | 2011-12-20 | 1 | -2/+1 |
| | | | | | | There are a bunch of other implicit branches that adds 1.8.x specific code that still needs to be removed. Pull requests for those cases are welcome. | ||||
* | Fix inconsistencies with Time{WithZone}#{hash,eql?} | Marc-Andre Lafortune | 2011-11-22 | 1 | -2/+9 |
| | |||||
* | Fix xmlschema output with fraction_digits >0 | shtirlic | 2011-07-11 | 1 | -0/+7 |
| | | | | | Current implementation produce incorrect output when Time#usec returns integer < 100000, because to_s doesn't add leading zeros. | ||||
* | added find_zone and find_zone! to AS timezones and changed the AS Railtie to ↵ | Josh Kalderimis | 2011-04-05 | 1 | -0/+18 |
| | | | | | | use find_zone! as well as adding Railtie tests Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Raise on invalid timezone | Marc-Andre Lafortune | 2011-04-05 | 1 | -5/+26 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | updated Time, Date and DateTime current methods in AS to use Time.zone and ↵ | Josh Kalderimis | 2011-02-28 | 1 | -7/+8 |
| | | | | | | not Time.zone_default. [#6410 state:committed] | ||||
* | prefering psych as the yaml parser if possible, fixing assertions for YAML ↵ | Aaron Patterson | 2011-01-21 | 1 | -2/+2 |
| | | | | 1.1 compatibility | ||||
* | make our yaml output consistent | Aaron Patterson | 2011-01-04 | 1 | -1/+1 |
| | |||||
* | Fix ActiveSupport::TimeWithZone#localtime method with DateTime | Alvaro Bautista | 2010-11-11 | 1 | -0/+11 |
| | | | | | | [#5344 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -3/+3 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | Don't store incorrect values in zones_map | Santiago Pastorino | 2010-06-28 | 1 | -3/+1 |
| | | | | | | [#4942 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | when the timezone is nil, a TimeWithZone object should not be constructed. ↵ | Aaron Patterson | 2010-06-17 | 1 | -0/+7 |
| | | | | | | [#4881 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fix test incorrectly using a bare assert to use assert_kind_of | Santiago Pastorino | 2010-05-24 | 1 | -1/+1 |
| | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Final iteration of use better testing methods | Neeraj Singh | 2010-05-19 | 1 | -6/+6 |
| | | | | | | [#4652 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Switch to TimezoneProxy for later support of deferred TZ loading | Jeremy Kemper | 2010-04-20 | 1 | -2/+5 |
| | |||||
* | Ensure test sets json time format flag | Jeremy Kemper | 2010-01-28 | 1 | -1/+4 |
| | |||||
* | Add test for TimeWithZone#to_i with wrapped DateTime | Geoff Buesing | 2009-12-15 | 1 | -0/+6 |
| | |||||
* | Pull in time extensions also | Jeremy Kemper | 2009-06-05 | 1 | -1/+1 |
| | |||||
* | Work around Float faux precision | Jeremy Kemper | 2009-04-30 | 1 | -1/+1 |
| | |||||
* | * Add pluggable JSON backends with support for the JSON gem. [rick] | rick | 2009-04-23 | 1 | -2/+2 |
| | | | | | | | | | | | | | | Example: ActiveSupport::JSON.backend = "JSONGem" All internal Rails JSON encoding is now handled by ActiveSupport::JSON.encode(). Use of #to_json is not recommended, as it may clash with other libraries that overwrite it. However, you can recover Rails specific functionality if you really want to use #to_json. gem 'json' ActiveSupport::JSON.backend = "JSONGem" class ActiveRecord::Base alias to_json rails_to_json end | ||||
* | Fix dependencies revealed by testing in isolation | Jeremy Kemper | 2009-04-22 | 1 | -0/+1 |
| | |||||
* | Merge branch 'master' into cherry | Jeremy Kemper | 2009-04-20 | 1 | -0/+4 |
|\ | | | | | | | | | | | | | | | | | | | | | Conflicts: activesupport/CHANGELOG activesupport/lib/active_support/core_ext/class/delegating_attributes.rb activesupport/lib/active_support/core_ext/hash/conversions.rb activesupport/lib/active_support/core_ext/module/attribute_accessors.rb activesupport/lib/active_support/core_ext/string/multibyte.rb activesupport/lib/active_support/core_ext/time/calculations.rb activesupport/lib/active_support/deprecation.rb | ||||
| * | TimeWithZone.name returns 'Time', to further thwart type checking | Geoff Buesing | 2009-04-05 | 1 | -0/+4 |
| | | |||||
* | | Explicit test dependencies | Jeremy Kemper | 2009-03-28 | 1 | -0/+1 |
|/ | |||||
* | Ruby 1.9 compat: rename deprecated assert_raises to assert_raise. | Jeremy Kemper | 2009-03-08 | 1 | -1/+1 |
| | | | | [#1617 state:resolved] | ||||
* | Remove obsolete silence_warnings wrappers from TZInfo-dependent tests in ↵ | Levin Alexander | 2009-02-14 | 1 | -254/+162 |
| | | | | ActiveSupport [#1914 state:resolved] | ||||
* | Make TimeWithZone#to_formatted_s an alias to TimeWithZone#to_s [#1796 ↵ | Levin Alexander | 2009-02-08 | 1 | -0/+6 |
| | | | | state:resolved] | ||||
* | TimeWithZone#xmlschema accepts optional fraction_digits argument [#1725 ↵ | Nicholas Dainty | 2009-01-11 | 1 | -0/+9 |
| | | | | state:resolved] | ||||
* | TimeWithZone#- gives correct result with wrapped DateTime, and with DateTime ↵ | gbuesing | 2009-01-04 | 1 | -0/+9 |
| | | | | argument | ||||
* | Require mocha >= 0.9.0 for AS tests | Jeremy Kemper | 2008-11-22 | 1 | -72/+66 |
| | |||||
* | TimeWithZone#freeze: preload instance variables so that we can actually freeze | gbuesing | 2008-10-19 | 1 | -0/+13 |
| | |||||
* | TimeWithZone #wday, #yday and #to_date avoid trip through #method_missing | gbuesing | 2008-09-14 | 1 | -1/+3 |
| | |||||
* | Add thorough tests for Time-object #past?, #future? and #today. Fix ↵ | gbuesing | 2008-09-14 | 1 | -10/+49 |
| | | | | 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 | -9/+22 |
| | | | | classes to facilitate Date/Time comparisons. | ||||
* | Fix TimeWithZone unmarshaling: coerce unmarshaled Time instances to utc, ↵ | gbuesing | 2008-07-14 | 1 | -0/+6 |
| | | | | because Ruby's marshaling of Time instances doesn't respect the zone | ||||
* | TimeWithZone: when crossing DST boundary, treat Durations of days, months or ↵ | gbuesing | 2008-06-29 | 1 | -0/+168 |
| | | | | years as variable-length, and all other values as absolute length. A time + 24.hours will advance exactly 24 hours, but a time + 1.day will advance 23-25 hours, depending on the day. Ensure consistent behavior across all advancing methods. |