aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time.rb
Commit message (Collapse)AuthorAgeFilesLines
* Added ability to compare date/time with infinitybUg2013-01-041-0/+1
| | | | | | | | | | | | | | | | | Date, DateTime, Time and TimeWithZone can now be compared to infinity, so it's now possible to create ranges with one infinite bound and date/time object as another bound. Ex.: @range = Range.new(Date.today, Float::INFINITY) Also it's possible to check inclusion of date/time in range with conversion. Ex.: @range.include?(Time.now + 1.year) # => true @range.include?(DateTime.now + 1.year) # => true Ability to create date/time ranges with infinite bound is required for handling postgresql range types.
* Added time related req files to AS core_ext #6896Aaron Cruz2012-07-141-0/+5
| | | | | | This way you can `require 'active_record/core_ext/time'` for example I see these libs are available through `active_record/time` but not individually
* Consolidate date & time landscape: require 'active_support/time'Jeremy Kemper2009-11-141-10/+0
|
* Convert Time conversions extension module to class reopenJeremy Kemper2009-03-281-3/+1
|
* Tease out Object#acts_like? behaviorsJeremy Kemper2009-03-281-0/+1
|
* Convert Time extension modules to class reopensJeremy Kemper2009-03-261-1/+4
|
* Extract time fixes into separate extensionsJeremy Kemper2009-03-241-27/+2
|
* * Introduce ActiveSupport.core_ext Integer, %w(conversions time etc)Jeremy Kemper2009-03-211-11/+2
| | | | | | * Convert some extension modules to simply reopening the class * Remove deprecated Float time extensions * Fold Base64 extension into ActiveSupport::Base64 since stdlib Base64 is gone
* Handle the case where there is no ivar set.Michael Koziarski2008-09-041-1/+1
| | | | This happens on jruby due to a bug, but also on historically marshalled data.
* Fix Ruby's Time marshaling bug in pre-1.9 versions of Ruby: utc instances ↵Luca Guidi2008-08-271-1/+22
| | | | are now correctly unmarshaled with a utc zone instead of the system local zone [#900 state:resolved]
* Introduce ActiveSupport::TimeWithZone, for wrapping Time instances with a ↵Geoff Buesing2008-01-231-0/+2
| | | | | | TimeZone. Introduce instance methods to Time for creating TimeWithZone instances, and class methods for managing a global time zone git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8696 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat, consistent load pathsJeremy Kemper2007-10-021-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 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-0/+10
| | | | | | 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/+2
| | | | | | facilitate duck-typing git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5951 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time::Conversions for getting times in different convenient string ↵David Heinemeier Hansson2005-02-211-0/+2
| | | | | | representations and other objects git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@737 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time::Calculations to ask for things like Time.now.tomorrow, ↵David Heinemeier Hansson2005-02-211-0/+5
Time.now.yesterday, Time.now.months_ago(4) #580 [DP|Flurin] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@731 5ecf4fe2-1ee6-0310-87b1-e25e094e27de