aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Check for date/time methods that moved upstream in 1.9Jeremy Kemper2009-05-071-1/+1
|
* Prefer behavior check to RUBY_VERSION to catch 1.8 backportsJeremy Kemper2009-04-291-2/+2
|
* Merge branch 'master' into cherryJeremy Kemper2009-04-201-11/+3
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: activesupport/CHANGELOG activesupport/lib/active_support/core_ext/class/delegating_attributes.rb activesupport/lib/active_support/core_ext/hash/conversions.rb activesupport/lib/active_support/core_ext/module/attribute_accessors.rb activesupport/lib/active_support/core_ext/string/multibyte.rb activesupport/lib/active_support/core_ext/time/calculations.rb activesupport/lib/active_support/deprecation.rb
| * Time.local instances: Adding 24.hours across the DST boundary adds 24 hours ↵Michael Curtis2009-03-291-11/+3
| | | | | | | | instead of one day [#2066 state:resolved]
* | JRuby doesn't have UnboundMethod#nameJeremy Kemper2009-03-291-1/+1
| |
* | Convert Time conversions extension module to class reopenJeremy Kemper2009-03-282-83/+79
| |
* | Explicit dependency on Date calculations extensionsJeremy Kemper2009-03-281-0/+1
| |
* | Tease out Object#acts_like? behaviorsJeremy Kemper2009-03-282-13/+8
| |
* | Convert Time extension modules to class reopensJeremy Kemper2009-03-262-379/+352
| |
* | Extract time fixes into separate extensionsJeremy Kemper2009-03-242-0/+32
| |
* | Move Numeric#to_utc_offset_s to TimeZone.seconds_to_utc_offsetJeremy Kemper2009-03-231-1/+1
|/
* Time#to_s(:rfc822) uses #formatted_offset instead of unreliable and ↵Zachary Zolton2009-02-091-1/+1
| | | | non-standard %z directive [#1899 state:resolved]
* Explicitly require AS::DurationJeremy Kemper2008-11-171-0/+2
|
* Time#advance recognizes fractional days and weeks [#970 state:resolved]Tom Lea2008-10-131-0/+10
|
* Fixed Time#end_of_quarter to not blow up on May 31st [#313 state:resolved]Carlos Brando2008-09-191-1/+1
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Introduce convenience methods past?, today? and future? for Date and Time ↵Clemens Kofler2008-09-141-10/+25
| | | | classes to facilitate Date/Time comparisons.
* Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, ↵Jeremy Kemper2008-08-311-1/+1
| | | | | | | | | | but it has since been removed from 1.9. Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> Conflicts: actionpack/test/controller/layout_test.rb
* Merge docrails changesPratik Naik2008-07-281-0/+1
|
* Merge with docrails.Pratik Naik2008-07-161-1/+1
|
* Merge docrails.Pratik Naik2008-05-252-13/+13
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Adding documentation for time zone featuresgbuesing2008-05-181-8/+19
|
* Improve documentation coverage and markupXavier Noria2008-05-021-4/+6
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Duration #since and #ago with no argument (e.g., 5.days.ago) return ↵gbuesing2008-04-201-0/+5
| | | | TimeWithZone when config.time_zone is set. Introducing Time.current, which returns Time.zone.now if config.time_zone is set, otherwise just returns Time.now
* Time#since behaves correctly when passed a Duration. Closes #11527 [kemiller]gbuesing2008-04-121-5/+8
|
* Improve documentation.Pratik Naik2008-04-052-30/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time #yesterday and #tomorrow behave correctly crossing DST boundary. Closes ↵Geoff Buesing2008-04-041-2/+2
| | | | | | #7399 [sblackstone] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9221 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time.zone= accepts TZInfo::Timezone instances and Olson identifiers; wraps ↵Geoff Buesing2008-03-281-2/+9
| | | | | | result in TimeZone instance git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9107 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve documentation.Pratik Naik2008-03-261-5/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time, DateTime and TimeWithZone #in_time_zone defaults to Time.zone. ↵Geoff Buesing2008-03-171-19/+16
| | | | | | Removing now unneeded #in_current_time_zone. ActiveRecord time zone aware attributes updated to use #in_time_zone git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removing unneeded #change_time_zone method from Time, DateTime and TimeWithZoneGeoff Buesing2008-03-111-13/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9008 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding Time#end_of_day, _quarter, _week, and _year. Closes #9312.Jeremy Kemper2008-02-271-0/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time.=== returns true for TimeWithZone instancesGeoff Buesing2008-02-161-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time#zone=, #in_time_zone and #change_time_zone accept a DurationGeoff Buesing2008-02-101-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time#in_time_zone handles Time.local instances correctlyGeoff Buesing2008-02-101-4/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pruning unneeded Time#change_time_zone_to_current. Enhanced docs for ↵Geoff Buesing2008-02-101-7/+6
| | | | | | #change_time_zone git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8848 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Time Zone support to ActiveRecord, and config.time_zone property for ↵Rick Olson2008-02-061-1/+3
| | | | | | specifying a default Time Zone. Closes #10982 [Geoff Buesing, rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8806 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time#- coerces TimeWithZone argument to a Time instance so that difference ↵Geoff Buesing2008-01-251-0/+11
| | | | | | in seconds can be calculated. Closes #10914 [Geoff Buesing, yyyc514] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8730 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time.get_zone refactored to private method, given that the encapsulated ↵Geoff Buesing2008-01-251-6/+12
| | | | | | logic is only useful internally git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time.zone uses thread-local variable for thread safety. Adding ↵Geoff Buesing2008-01-251-7/+13
| | | | | | | | Time.use_zone, for overriding Time.zone locally inside a block. Removing unneeded Time.zone_reset! git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time.days_in_month defaults to current year if no year is supplied as ↵Geoff Buesing2008-01-251-12/+7
| | | | | | argument, uses Date.gregorian_leap? to determine leap year, and uses constant lookup to determine days in month. Closes #10799 [Radar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8715 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding Time and DateTime #compare_with_coercion, which layers behavior on ↵Geoff Buesing2008-01-231-0/+17
| | | | | | #<=> so that any combination of Time, DateTime and ActiveSupport::TimeWithZone instances can be chronologically compared git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8711 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time #in_current_time_zone and #change_time_zone_to_current return self when ↵Geoff Buesing2008-01-231-2/+2
| | | | | | Time.zone is nil git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8708 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor Time and DateTime #to_formatted_s: use ternary instead of nested ↵Geoff Buesing2008-01-231-9/+2
| | | | | | if/else git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8699 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding Time and DateTime #formatted_offset, for outputting +HH:MM utc offset ↵Geoff Buesing2008-01-231-0/+8
| | | | | | strings with cross-platform consistency git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8698 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce ActiveSupport::TimeWithZone, for wrapping Time instances with a ↵Geoff Buesing2008-01-231-0/+68
| | | | | | 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
* 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