aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/date
Commit message (Collapse)AuthorAgeFilesLines
* Introduce convenience methods past?, today? and future? for Date and Time ↵Clemens Kofler2008-09-141-9/+24
| | | | classes to facilitate Date/Time comparisons.
* Date#freeze bug doesn't affect Ruby 1.9Jeremy Kemper2008-08-281-7/+11
|
* Date#freeze bug doesn't affect Ruby 1.9Jeremy Kemper2008-08-281-8/+17
|
* Work around frozen Date memoizationJeremy Kemper2008-08-251-0/+16
|
* Fixed Date#end_of_quarter to not blow up on May 31st [#289 state:resolved] ↵David Heinemeier Hansson2008-06-021-1/+1
| | | | (Danger)
* Adding Date.current, which returns Time.zone.today if config.time_zone is ↵gbuesing2008-05-081-0/+5
| | | | set; otherwise returns Date.today. ActionView date_helper uses Date.current to determine locale-appropriate default
* Improve documentation coverage and markupXavier Noria2008-05-021-1/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Improve documentation.Pratik Naik2008-04-051-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve documentation.Pratik Naik2008-03-261-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding Time#end_of_day, _quarter, _week, and _year. Closes #9312.Jeremy Kemper2008-02-271-0/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Simplify to_formatted_s docs. Closes #10747 [Jeremy Kemper]Jeremy Kemper2008-01-091-24/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8608 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document date and time to_formatted_s. Closes #10747 [leethal]Jeremy Kemper2008-01-091-1/+21
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8606 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Moved the caching stores from ActionController::Caching::Fragments::* to ↵David Heinemeier Hansson2008-01-031-0/+1
| | | | | | ActiveSupport::Cache::*. If you're explicitly referring to a store, like ActionController::Caching::Fragments::MemoryStore, you need to update that reference with ActiveSupport::Cache::MemoryStore [DHH] Deprecated ActionController::Base.fragment_cache_store for ActionController::Base.cache_store [DHH] All fragment cache keys are now by default prefixed with the 'views/' namespace [DHH] Added ActiveRecord::Base.cache_key to make it easier to cache Active Records in combination with the new ActiveSupport::Cache::* libraries [DHH] Added ActiveSupport::Gzip.decompress/compress(source) as an easy wrapper for Zlib [Tobias Luetke] Included MemCache-Client to make the improved ActiveSupport::Cache::MemCacheStore work out of the box [Bob Cottrell, Eric Hodel] Added config.cache_store to environment options to control the default cache store (default is FileStore if tmp/cache is present, otherwise MemoryStore is used) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8546 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: normalize date and time xmlschema to match Ruby's ↵Jeremy Kemper2007-12-151-0/+3
| | | | | | formatting [chuyeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document Date conversions. Closes #10368 [chuyeow]Michael Koziarski2007-12-051-4/+34
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8279 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Honor Ruby's default calendar reform setting when creating DateTime objects ↵Geoff Buesing2007-11-241-1/+1
| | | | | | 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
* Change Time and DateTime #end_of_month to return last second of month ↵Geoff Buesing2007-11-241-1/+1
| | | | | | instead of beginning of last day of month. Closes #10200 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8198 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time, Date and DateTime #advance accept :weeks option. Closes #9866.Jeremy Kemper2007-10-131-1/+2
| | | | 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-2/+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-21/+4
| | | | | | #9863. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Date/Time/DateTime Ruby 1.9 compatJeremy Kemper2007-09-271-5/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7647 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation: remove deprecated :mday option from Time, Date, and ↵Jeremy Kemper2007-09-181-1/+1
| | | | | | DateTime#change. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7508 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Some 1.9 forward compatibilityJeremy Kemper2007-09-142-13/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Time#advance bug when trying to advance a year from leap day. Closes ↵Rick Olson2007-08-031-4/+5
| | | | | | #8655 [gbuesing] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7262 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Date#since, ago, beginning_of_day, and end_of_day. Date + seconds works ↵Jeremy Kemper2007-06-041-0/+26
| | | | | | 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-124/+132
| | | | 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/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6933 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move common DateTime calculations to Date. Closes #8536.Jeremy Kemper2007-06-011-0/+108
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6921 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Date#change (like Time#change) [DHH]David Heinemeier Hansson2007-05-311-0/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6910 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* DateTime#to_time converts to Time unless out of range. Date#to_datetime and ↵Jeremy Kemper2007-05-301-7/+11
| | | | | | Date#to_s(:rfc822). Closes #8512. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6902 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Date, Time, and DateTime support formatting blocks in addition to strftime ↵Jeremy Kemper2007-05-251-4/+13
| | | | | | strings. Introduce :long_ordinal format, e.g. 'February 21st, 2005'. Closes #8191. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6844 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* :db format for Date#to_sJeremy Kemper2007-01-281-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6060 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix that Dates couldn't be subtracted from Dates after [5940].Sam Stephenson2007-01-151-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5954 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Object#acts_like? and Time#acts_like_time? and Date#acts_like_date? to ↵Jamis Buck2007-01-151-0/+13
| | | | | | facilitate duck-typing git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5951 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make 1.months and friends accurate by introducing a Duration class. #6835 ↵Michael Koziarski2007-01-151-0/+41
| | | | | | [eventualbuddha] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* DateTime#to_time gives hour/minute/second resolution. Closes #5747.Jeremy Kemper2006-08-071-4/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Module#alias_attribute [Jamis/DHH]David Heinemeier Hansson2006-08-031-3/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Date in iso8601 should just be a to_s aliasDavid Heinemeier Hansson2006-03-181-3/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3952 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dates should be able to go xmlschema too [DHH]David Heinemeier Hansson2006-03-181-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3950 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added to_s(:db) to RangeDavid Heinemeier Hansson2005-10-091-2/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2506 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Slight change to allow custom date/time conversions #1326 [Rick Olson]David Heinemeier Hansson2005-05-211-5/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1344 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Documentation stuffDavid Heinemeier Hansson2005-02-241-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@784 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Date::Conversions for getting dates in different convenient string ↵David Heinemeier Hansson2005-02-211-0/+31
representations and other objects git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@738 5ecf4fe2-1ee6-0310-87b1-e25e094e27de