aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/duration.rb
Commit message (Collapse)AuthorAgeFilesLines
* Duration requires BasicObject in case it's autoloaded earlyJeremy Kemper2008-11-231-0/+2
|
* Duration #since and #ago with no argument (e.g., 5.days.ago) return ↵gbuesing2008-04-201-3/+3
| | | | 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
* Ruby 1.9 compat: add #raise to AS::BasicObject, fixup Duration argument ↵Jeremy Kemper2008-01-021-1/+1
| | | | | | error. Closes #10594. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8523 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Revert const_missing bypass in favor of Duration constant lookup tweakJeremy Kemper2007-12-151-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: define Duration#== [chuyeow]Jeremy Kemper2007-12-151-25/+35
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce BasicObject as Builder::BlankSlate for Ruby 1.9 forward compatibility.Jeremy Kemper2007-10-071-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Date#since, ago, beginning_of_day, and end_of_day. Date + seconds works ↵Jeremy Kemper2007-06-041-4/+1
| | | | | | now. Closes #8575. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time durations use since instead of + for accuracy. Closes #8513.Jeremy Kemper2007-05-301-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6901 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added test coverage for Inflector.inflections.clear. Closes #7179. [Rich ↵Rick Olson2007-01-231-1/+1
| | | | | | Collins]. Remove unused code from Duration#inspect. Closes #7180. [Rich Collins] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* change Duration to use the new Object#acts_like? helper to do duck typingJamis Buck2007-01-151-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5952 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure Duration uses duck-typing instead of explicit classes, so apps can ↵Jamis Buck2007-01-151-3/+4
| | | | | | pass proxy objects around and have it all "just work" git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5948 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make 1.months and friends accurate by introducing a Duration class. #6835 ↵Michael Koziarski2007-01-151-0/+88
[eventualbuddha] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de