aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/date_ext_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* use AS::TestCase as the base classAaron Patterson2012-01-051-1/+1
|
* Initial pass at removing dead 1.8.x code from Active Support.José Valim2011-12-201-10/+0
| | | | | | 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.
* add more tests for monday and sunday methodsVijay Dev2011-11-261-0/+2
|
* Tests added for monday and sunday Arun Agrawal2011-11-261-0/+8
| | | | | Reference commits : a8f2860d0e7db86c61bb70935006100b04667ab1 80ac4dc6d0632937ccf61b38bc15fc2f6e27b18b
* Allow a Date to be frozen more than once without an error in Ruby 1.8.xBradley Buda2011-06-081-0/+6
|
* removing stubs. 1.9.3 implements Date.today in C so mocking the return value ↵Aaron Patterson2011-03-071-9/+4
| | | | of Time.now does nothing
* updated Time, Date and DateTime current methods in AS to use Time.zone and ↵Josh Kalderimis2011-02-281-16/+16
| | | | | | not Time.zone_default. [#6410 state:committed]
* Add Date#rfc3339 and Date#iso8601 to ASSantiago Pastorino2011-02-131-0/+10
|
* implements weeks_ago and prev_week for Date/DateTime/Time [#5122 ↵Rob Zolkos & Xavier Noria2010-10-161-0/+16
| | | | state:committed]
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-8/+8
| | | | 's/[ \t]*$//' -i {} \;)
* Date#since, #ago, #beginning_of_day, #end_of_day, #xmlschema return ↵Geoff Buesing2010-06-121-1/+50
| | | | | | TimeWithZone when Time.zone_default is set Signed-off-by: Xavier Noria <fxn@hashref.com>
* oops, two cancelling errors made a previous test pass, fixing itXavier Noria2010-06-071-1/+1
|
* the order in which we apply deltas in Date#advance matters, add test ↵Xavier Noria2010-06-071-0/+10
| | | | coverage for that
* removes deprecations of last_(month|year) from master, they will be ↵Xavier Noria2010-05-191-8/+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-9/+17
| | | | deprecates last_(month|year)
* adds calendar reform test coverage for more relevant date calculationsXavier Noria2010-05-091-1/+14
|
* Backports Date#>> from 1.9 so that calculations do the right thing around ↵Xavier Noria2010-05-091-0/+27
| | | | | | | | | | the calendar reform Our next_month gives November for some late dates in September of 1582. Related methods, last_*, and in general advance have the same issues. This commit fixes those, see the test suite for expected behavior, which we still run in 1.9 to ensure it matches as we do with other methods defined in Date in 1.9.
* add test coverage for (last|next)_year on leap yearsXavier Noria2010-05-081-0/+8
|
* let Time.time_with_datetime_fallback handle properly years in the range 0..138Xavier Noria2010-05-051-1/+7
|
* adds test coverage for Date.current vs Date.today in ↵Xavier Noria2010-05-031-1/+45
| | | | Date.(yesterday|tomorrow) implementation
* revises tests for Date.yesterday and Date.tomorrowXavier Noria2010-05-021-3/+3
|
* Consolidate date & time landscape: require 'active_support/time'Jeremy Kemper2009-11-141-1/+1
|
* Duplicating the options hash in Date#advance to prevent modification of the ↵Jay Pignata2009-08-311-0/+6
| | | | | | original [#1133 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Setting usec (and nsec for Ruby 1.9) on Time#end_of_* methods [#1255 ↵Hugo Peixoto2009-08-091-1/+1
| | | | | | status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Explicit test dependenciesJeremy Kemper2009-03-291-0/+1
|
* Remove obsolete silence_warnings wrappers from TZInfo-dependent tests in ↵Levin Alexander2009-02-141-7/+5
| | | | ActiveSupport [#1914 state:resolved]
* Require mocha >= 0.9.0 for AS testsJeremy Kemper2008-11-221-36/+32
|
* Add thorough tests for Time-object #past?, #future? and #today. Fix ↵gbuesing2008-09-141-11/+19
| | | | 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 Kofler2008-09-141-0/+15
| | | | classes to facilitate Date/Time comparisons.
* Work around frozen Date memoizationJeremy Kemper2008-08-251-4/+12
|
* Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ↵Joshua Peek2008-06-031-7/+7
| | | | ActiveSupport [#238 state:resolved]
* Added tests [#279 state:resolved] (Nicholas Schlueter)David Heinemeier Hansson2008-06-021-0/+4
|
* Fixed Date#end_of_quarter to not blow up on May 31st [#289 state:resolved] ↵David Heinemeier Hansson2008-06-021-0/+1
| | | | (Danger)
* Adding Date.current, which returns Time.zone.today if config.time_zone is ↵gbuesing2008-05-081-0/+23
| | | | set; otherwise returns Date.today. ActionView date_helper uses Date.current to determine locale-appropriate default
* Adding Time#end_of_day, _quarter, _week, and _year. Closes #9312.Jeremy Kemper2008-02-271-0/+23
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* with_timezone test helper renamed with_env_tz, to distinguish between ↵Geoff Buesing2008-01-261-2/+2
| | | | | | setting ENV['TZ'] and setting Time.zone in tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8731 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Honor Ruby's default calendar reform setting when creating DateTime objects ↵Geoff Buesing2007-11-241-0/+2
| | | | | | via ActiveRecord's Time -> DateTime overflow, Time#time_with_datetime_fallback, Time#to_datetime, Date#to_datetime and String#to_datetime. Closes #10201 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cater for DST changes when converting Times to DateTimes. Closes #10068 ↵Michael Koziarski2007-11-051-2/+6
| | | | | | [gbuesing] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8076 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time, Date and DateTime #advance accept :weeks option. Closes #9866.Jeremy Kemper2007-10-131-1/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7868 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Date#years_ago and #years_since from leap days. Closes #9864.Jeremy Kemper2007-10-131-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7863 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor Time and Date#months_since and #months_ago to use #advance. Closes ↵Jeremy Kemper2007-10-131-0/+4
| | | | | | #9863. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Some platforms include colon in timezone offset, some don't. References #9744.Jeremy Kemper2007-10-031-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7733 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Date#xmlschema for dates outside the range of what can be created with ↵David Heinemeier Hansson2007-10-011-0/+16
| | | | | | Time (closes #9744) [gbuesing] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7707 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed spelling errors (closes #9706) [tarmo/rmm5t]David Heinemeier Hansson2007-09-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Time#advance bug when trying to advance a year from leap day. Closes ↵Rick Olson2007-08-031-0/+1
| | | | | | #8655 [gbuesing] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7262 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve Time and Date test coverage. Closes #8646.Jeremy Kemper2007-06-141-13/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7019 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Date#since, ago, beginning_of_day, and end_of_day. Date + seconds works ↵Jeremy Kemper2007-06-041-0/+16
| | | | | | now. Closes #8575. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Date.yesterday and .tomorrow. Closes #8571.Jeremy Kemper2007-06-041-0/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Readable Date and DateTime#inspect. Closes #8570.Jeremy Kemper2007-06-041-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6933 5ecf4fe2-1ee6-0310-87b1-e25e094e27de