aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time
Commit message (Collapse)AuthorAgeFilesLines
...
* Document date and time to_formatted_s. Closes #10747 [leethal]Jeremy Kemper2008-01-091-2/+22
| | | | 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
* Enhance documentation for Active Support's Time Conversion functions. ↵Michael Koziarski2007-12-051-3/+46
| | | | | | [rsanheim, jeremymcanally, chuyeow] Closes #7164 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8278 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Honor Ruby's default calendar reform setting when creating DateTime objects ↵Geoff Buesing2007-11-242-2/+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
* 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
* Cater for DST changes when converting Times to DateTimes. Closes #10068 ↵Michael Koziarski2007-11-051-1/+1
| | | | | | [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/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7868 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Time#years_ago and #years_since from leap days. Closes #9865.Jeremy Kemper2007-10-131-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7867 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time and DateTime#advance accept :hours, :minutes, and :seconds options. ↵Jeremy Kemper2007-10-131-2/+4
| | | | | | Closes #9825. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7866 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
* 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
* Date/Time/DateTime Ruby 1.9 compatJeremy Kemper2007-09-271-1/+1
| | | | 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-5/+5
| | | | | | 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-8/+12
| | | | 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/+2
| | | | | | #8655 [gbuesing] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7262 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix one line formatting bugMichael Koziarski2007-07-191-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7196 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Date#change (like Time#change) [DHH]David Heinemeier Hansson2007-05-311-1/+1
| | | | 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-1/+2
| | | | | | 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-9/+18
| | | | | | 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
* Time#since overflows to DateTime. Introduce Time#to_datetime. Closes #7715.Jeremy Kemper2007-03-052-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6335 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Out-of-range Time calculations transparently overflow to DateTime. Closes #7706.Jeremy Kemper2007-03-041-24/+44
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6305 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.8-cvs and 1.9 define a private Time#to_date that overrides Active ↵Jeremy Kemper2007-02-011-3/+0
| | | | | | Support. Make it public to preserve compatibility. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6099 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/+21
| | | | | | [eventualbuddha] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time#to_s(:time) which will just return H:M, like 17:44 [DHH]David Heinemeier Hansson2006-11-251-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5628 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix end of dayDavid Heinemeier Hansson2006-11-141-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5523 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time#end_of_day to get 23:59:59 of that day [DHH]David Heinemeier Hansson2006-11-121-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5495 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* next_week respects DST changes. Closes #5617, closes #2353, closes #2509, ↵Jeremy Kemper2006-11-021-6/+7
| | | | | | references #4551. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5388 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* next_week respects DST changes. Closes #6483.Jeremy Kemper2006-10-241-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5363 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace alias method chaining with Module#alias_method_chain. [Marcel Molina ↵Marcel Molina2006-04-291-2/+1
| | | | | | Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4312 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace Ruby's deprecated append_features in favor of included. [Marcel ↵Marcel Molina2006-04-291-2/+1
| | | | | | Molina Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4310 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time#advance to do precise time time calculations for cases where a ↵David Heinemeier Hansson2006-03-161-0/+9
| | | | | | month being approximated to 30 days won't do (closes #1860) [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3887 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time#xmlschema is only available when you've required 'time'. Add a unit ↵Michael Koziarski2006-03-151-0/+1
| | | | | | test to catch regressions. [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3880 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time#beginning_of_quarter (closes #3607) [cohen.jeff@gmail.com]David Heinemeier Hansson2006-02-261-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3659 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time#end_of_month to accompany Time#beginning_of_month (closes #2514) ↵David Heinemeier Hansson2005-10-261-0/+8
| | | | | | [Jens-Christian Fischer] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2745 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Time#change should also reset usec when also resetting minutes ↵David Heinemeier Hansson2005-10-131-1/+1
| | | | | | #2459 [ikeda@dream.big.or.jp] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2568 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace '%e' from long and short time formats as Windows does not support ↵Marcel Molina2005-10-101-2/+2
| | | | | | it. Closes #2344. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2512 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add :rfc822 as an option for Time#to_s (to get rfc822-formatted times)Jamis Buck2005-10-031-4/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2445 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make Time#last_month work when invoked on the 31st of a month.Jamis Buck2005-08-311-6/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Time.days_in_month, and make Time#next_month work when invoked on the ↵Jamis Buck2005-08-311-5/+28
| | | | | | 31st of a month git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2082 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Time#midnight would have a non-zero usec on some platforms #1836Jamis Buck2005-07-311-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1959 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Time#at_beginning_of_week returned the next Monday instead of the ↵David Heinemeier Hansson2005-06-161-1/+2
| | | | | | previous one when called on a Sunday #1403 [jean.helou@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1431 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Slight change to allow custom date/time conversions #1326 [Rick Olson]David Heinemeier Hansson2005-05-211-6/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1344 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Time#last_year to go back in time, not forward #1278 [fabien@odilat.com]David Heinemeier Hansson2005-05-191-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1319 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Time.local(2005,12).months_since(1) would raise "ArgumentError: ↵David Heinemeier Hansson2005-05-191-1/+2
| | | | | | argument out of range" #1311 [jhahn@niveon.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1308 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added year-based time calculationsDavid Heinemeier Hansson2005-02-241-1/+28
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@779 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Date::Conversions for getting dates in different convenient string ↵David Heinemeier Hansson2005-02-211-2/+4
| | | | | | representations and other objects git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@738 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time::Conversions for getting times in different convenient string ↵David Heinemeier Hansson2005-02-211-0/+32
| | | | | | representations and other objects git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@737 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make it possible to say Time.now.in(1.year)David Heinemeier Hansson2005-02-211-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@735 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added last_month and next_monthDavid Heinemeier Hansson2005-02-211-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@734 5ecf4fe2-1ee6-0310-87b1-e25e094e27de