aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time
Commit message (Collapse)AuthorAgeFilesLines
...
* Add missing require in Active Support time zones (fixes #5854)Piotr Sarnacki2012-04-151-1/+1
| | | | | I also removed the other require as it's already present in `activesupport/core_ext/time/calculations`
* Merge pull request #4284 from mattdbridges/time_calculation_aliasesXavier Noria2012-02-281-0/+3
|\ | | | | 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 DateMatt Bridges2012-02-211-0/+3
| | | | | | | | core extensions
* | Update Time#change docs to reflect the options it usesEric Oestrich2012-02-171-1/+1
| | | | | | [ci skip]
* | Optional start_day argument for Time#all_week.kennyj2012-02-061-3/+3
| | | | | | | | Closes #4883
* | to_date, to_time, and to_datetime Time methods present in ruby 1.9Sergey Nartimov2012-01-131-28/+0
|/
* Nano seconds fraction of time is copied properly in Time#advancePawel Pierzchala2012-01-051-1/+1
| | | | | | 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.
* remove Time._dump and Time._load patching for ruby 1.8Vasiliy Ermolovich2011-12-251-27/+0
|
* no more need to make Time#to_date and Time#to_datetime publicSergey Nartimov2011-12-222-11/+0
| | | | they are public in actual 1.9 ruby version (tested at least in 1.9.2-p180)
* Adds Time#sunday methodVijay Dev2011-11-261-0/+6
|
* Convert aliases monday and sunday to methodsVijay Dev2011-11-261-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 infogregolsen2011-11-251-3/+3
|
* beginning_of_week extended in both Time and Date so that to return week ↵gregolsen2011-11-251-8/+16
| | | | start based on start day that is monday by default
* Merge pull request #3725 from marcandre/twz_eqlYehuda Katz2011-11-221-0/+10
|\ | | | | Fix inconsistencies with Time{WithZone}#{hash,eql?}
| * Fix inconsistencies with Time{WithZone}#{hash,eql?}Marc-Andre Lafortune2011-11-221-0/+10
| |
* | updating API docstring so that user can infer default valuegregolsen2011-11-171-2/+2
|/
* Edited activesupport/lib/active_support/core_ext/time/calculations.rb via GitHubJeremy Evans2011-09-011-1/+1
|
* Revert "Ruby 1.8.7+ provides to_date/to_datetime, AS just makes them ↵Chris Griego2011-08-311-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.0Guillermo Iguaran2011-08-051-0/+1
|
* Rename Time#whole_* to Time#all_* [thanks Pratik!]David Heinemeier Hansson2011-06-131-5/+5
|
* Added Time#whole_day/week/quarter/year as a way of generating ranges ↵David Heinemeier Hansson2011-06-131-1/+26
| | | | (example: Event.where(created_at: Time.now.whole_week)) [DHH]
* add some missing requires for AS core_ext/numeric/time. Closes #1038Josh Kalderimis2011-05-181-0/+1
|
* Merge pull request #227 from farski/masterSantiago Pastorino2011-05-111-3/+3
|\ | | | | Unnecessary redundancy in Time/Date calculations
| * Removed some redundant Time#change time options from beginning_of_ methods ↵Chris Kalafarski2011-03-131-3/+3
| | | | | | | | in Date and Time
* | Fix marshal round-tripping of fractional seconds (Time#subsec).Jason Weathered2011-04-171-0/+1
| |
* | added find_zone and find_zone! to AS timezones and changed the AS Railtie to ↵Josh Kalderimis2011-04-051-15/+18
| | | | | | | | | | | | use find_zone! as well as adding Railtie tests Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* | Raise on invalid timezoneMarc-Andre Lafortune2011-04-051-8/+12
|/ | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* refactored Time#<=> and DateTime#<=> by removing unnecessary calls without ↵Diego Carrion2011-03-041-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 Kalderimis2011-02-281-2/+2
| | | | | | not Time.zone_default. [#6410 state:committed]
* Merge branch 'master' of git://github.com/lifo/docrailsXavier Noria2011-02-051-4/+8
|\
| * Change Time.zone= docs.Brian Morearty2011-02-041-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 Firebaugh2011-02-031-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 Kalderimis2011-01-121-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 Noria2010-10-161-1/+11
| | | | state:committed]
* fix time.to_formatted_time(:time) exampleAditya Sanghi2010-10-131-2/+2
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-143-6/+6
| | | | 's/[ \t]*$//' -i {} \;)
* Refactor move some date, time and date_time methods to */zones and fixed ↵Santiago Pastorino2010-07-032-5/+5
| | | | some requires
* when the timezone is nil, a TimeWithZone object should not be constructed. ↵Aaron Patterson2010-06-171-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 Noria2010-05-191-11/+0
| | | | deprecated in 2.3 instead
* defines prev_(month|year) in Date and Time to ease transition to 1.9, and ↵Xavier Noria2010-05-121-2/+12
| | | | deprecates last_(month|year)
* let Time.time_with_datetime_fallback handle properly years in the range 0..138Xavier Noria2010-05-051-3/+5
|
* Ruby 1.9.2: marshaling round-trips Time#zoneJeremy Kemper2010-03-282-26/+56
|
* Actually check the value of the ivarwycats2010-03-271-4/+2
|
* Remove stray instance variable to resolve serialization problem [#3769 ↵wycats2010-03-271-3/+9
| | | | state:resolved] (ht: Joe Rafaniello)
* avoid active_support/core_ext/time/conversions.rb warningsSantiago Pastorino2010-03-211-0/+1
| | | | | | [#4250 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Time#- with a DateTime argument behaves the same as with a Time argument, ↵Geoff Buesing2010-01-271-1/+1
| | | | i.e. returns the difference between self and arg as a Float [#3476 status:resolved]
* Missing acts_like dependencyYehuda Katz2009-12-201-0/+1
|
* Ruby 1.9: fix Time#beginning_of_day inaccuracy due to subtracting a FloatJeremy Kemper2009-08-221-1/+2
|
* Setting usec (and nsec for Ruby 1.9) on Time#end_of_* methods [#1255 ↵Hugo Peixoto2009-08-091-8/+8
| | | | | | status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Merge docrailsPratik Naik2009-07-251-1/+1
|