Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Return local time for backwards compatibility | Andrew White | 2013-07-09 | 1 | -1/+1 |
| | |||||
* | Retain offset and fraction when using Time.at_with_coercion | Andrew White | 2013-07-09 | 1 | -3/+8 |
| | | | | | | | | | | | | | | | | 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/+12 |
| | | | | | | | 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 | -8/+4 |
| | | | | | | | | | | | | | (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 | -1/+2 |
| | | | | | | 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 | -0/+1 |
| | | | | | | Increase numeric-timestamp precision to nanoseconds Conflicts: activesupport/lib/active_support/core_ext/time/conversions.rb | ||||
* | Use send in Time marshal extensions since the methods are now private | Carlos Antonio da Silva | 2012-12-03 | 1 | -2/+2 |
| | | | | | | | See https://github.com/ruby/ruby/commit/9c1b3161f20162dc1682d758c0e4d2fc3a74745e All Active Support tests pass in 2.0.0preview2 after this change. Closes #8409 | ||||
* | adds a missing require [fixes #6896] | Xavier Noria | 2012-07-15 | 2 | -1/+1 |
| | | | | | This file uses Time.zone, which is defined in active_support/core_ext/time/zones.rb. | ||||
* | Merge pull request #6857 from rsutphin/as_core_ext_time_missing_require | Carlos Antonio da Silva | 2012-06-25 | 1 | -0/+1 |
| | | | | Missing require breaks Time.=== when selectively loading ActiveSupport core_exts in 3.2.4+ | ||||
* | added beginning_of_hour support to core_ext calculations for Time and DateTime | Mark J. Titorenko | 2012-05-04 | 1 | -0/+15 |
| | |||||
* | Remove circular require of time/zones | Oscar Del Ben | 2012-04-29 | 1 | -1/+0 |
| | |||||
* | Add missing require in Active Support time zones (fixes #5854) | Piotr Sarnacki | 2012-04-15 | 1 | -0/+1 |
| | | | | | I also removed the other require as it's already present in `activesupport/core_ext/time/calculations` | ||||
* | Update Time#change docs to reflect the options it uses | Eric Oestrich | 2012-02-18 | 1 | -1/+1 |
| | | | | [ci skip] | ||||
* | GH #4883. Optional start_day argument for Time#all_week | kennyj | 2012-02-05 | 1 | -3/+3 |
| | |||||
* | Adds Time#sunday method | Vijay Dev | 2011-11-26 | 1 | -0/+6 |
| | |||||
* | Convert aliases monday and sunday to methods | Vijay Dev | 2011-11-26 | 1 | -1/+6 |
| | | | | | | | | A recent change to beginning_of_week and end_of_week added an argument that can be used to specify the week's starting day as a symbol. Now these methods were aliased as monday and sunday respectively which as a consequence of the argument addition, made calls like obj.monday(:sunday) possible. This commit makes them methods on their own. | ||||
* | API docstrings updated with default value info | gregolsen | 2011-11-25 | 1 | -3/+3 |
| | |||||
* | beginning_of_week extended in both Time and Date so that to return week ↵ | gregolsen | 2011-11-25 | 1 | -8/+16 |
| | | | | 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/+10 |
|\ | | | | | Fix inconsistencies with Time{WithZone}#{hash,eql?} | ||||
| * | Fix inconsistencies with Time{WithZone}#{hash,eql?} | Marc-Andre Lafortune | 2011-11-22 | 1 | -0/+10 |
| | | |||||
* | | updating API docstring so that user can infer default value | gregolsen | 2011-11-17 | 1 | -2/+2 |
|/ | |||||
* | Edited activesupport/lib/active_support/core_ext/time/calculations.rb via GitHub | Jeremy Evans | 2011-09-01 | 1 | -1/+1 |
| | |||||
* | Revert "Ruby 1.8.7+ provides to_date/to_datetime, AS just makes them ↵ | Chris Griego | 2011-08-31 | 1 | -0/+22 |
| | | | | | | | | public." to support date implementations without private to_date/to_datetime on Time (home_run). This reverts commit 080345baca1076a9788dff4803153600aec31f86. Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Fix AR test suite error under Rubinius 2.0 | Guillermo Iguaran | 2011-08-05 | 1 | -0/+1 |
| | |||||
* | Rename Time#whole_* to Time#all_* [thanks Pratik!] | David Heinemeier Hansson | 2011-06-13 | 1 | -5/+5 |
| | |||||
* | Added Time#whole_day/week/quarter/year as a way of generating ranges ↵ | David Heinemeier Hansson | 2011-06-13 | 1 | -1/+26 |
| | | | | (example: Event.where(created_at: Time.now.whole_week)) [DHH] | ||||
* | add some missing requires for AS core_ext/numeric/time. Closes #1038 | Josh Kalderimis | 2011-05-18 | 1 | -0/+1 |
| | |||||
* | Merge pull request #227 from farski/master | Santiago Pastorino | 2011-05-11 | 1 | -3/+3 |
|\ | | | | | Unnecessary redundancy in Time/Date calculations | ||||
| * | Removed some redundant Time#change time options from beginning_of_ methods ↵ | Chris Kalafarski | 2011-03-13 | 1 | -3/+3 |
| | | | | | | | | in Date and Time | ||||
* | | Fix marshal round-tripping of fractional seconds (Time#subsec). | Jason Weathered | 2011-04-17 | 1 | -0/+1 |
| | | |||||
* | | added find_zone and find_zone! to AS timezones and changed the AS Railtie to ↵ | Josh Kalderimis | 2011-04-05 | 1 | -15/+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 | -8/+12 |
|/ | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | refactored Time#<=> and DateTime#<=> by removing unnecessary calls without ↵ | Diego Carrion | 2011-03-04 | 1 | -11/+2 |
| | | | | | | losing performance 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 | -2/+2 |
| | | | | | | not Time.zone_default. [#6410 state:committed] | ||||
* | Merge branch 'master' of git://github.com/lifo/docrails | Xavier Noria | 2011-02-05 | 1 | -4/+8 |
|\ | |||||
| * | Change Time.zone= docs. | Brian Morearty | 2011-02-04 | 1 | -4/+8 |
| | | | | | | | | | | Update the example to show how to reset the current thread's Time.zone upon exiting a request. | ||||
* | | Ruby 1.8.7+ provides to_date/to_datetime, AS just makes them public. | John Firebaugh | 2011-02-03 | 1 | -22/+0 |
|/ | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | In AS, only inflector/methods is need in proxy_wrappers.rb, as well as date, ↵ | Josh Kalderimis | 2011-01-12 | 1 | -1/+1 |
| | | | | | | date_time, and time conversions.rb. This fixes an issue when requiring json and AS saying that i18n is also required. 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 | -1/+11 |
| | | | | state:committed] | ||||
* | fix time.to_formatted_time(:time) example | Aditya Sanghi | 2010-10-13 | 1 | -2/+2 |
| | |||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 3 | -6/+6 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | Refactor move some date, time and date_time methods to */zones and fixed ↵ | Santiago Pastorino | 2010-07-03 | 2 | -5/+5 |
| | | | | some requires | ||||
* | when the timezone is nil, a TimeWithZone object should not be constructed. ↵ | Aaron Patterson | 2010-06-17 | 1 | -0/+2 |
| | | | | | | [#4881 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | removes deprecations of last_(month|year) from master, they will be ↵ | Xavier Noria | 2010-05-19 | 1 | -11/+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 | -2/+12 |
| | | | | deprecates last_(month|year) | ||||
* | let Time.time_with_datetime_fallback handle properly years in the range 0..138 | Xavier Noria | 2010-05-05 | 1 | -3/+5 |
| | |||||
* | Ruby 1.9.2: marshaling round-trips Time#zone | Jeremy Kemper | 2010-03-28 | 2 | -26/+56 |
| | |||||
* | Actually check the value of the ivar | wycats | 2010-03-27 | 1 | -4/+2 |
| | |||||
* | Remove stray instance variable to resolve serialization problem [#3769 ↵ | wycats | 2010-03-27 | 1 | -3/+9 |
| | | | | state:resolved] (ht: Joe Rafaniello) | ||||
* | avoid active_support/core_ext/time/conversions.rb warnings | Santiago Pastorino | 2010-03-21 | 1 | -0/+1 |
| | | | | | | [#4250 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> |