aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/numeric
Commit message (Collapse)AuthorAgeFilesLines
* add some missing requires for AS core_ext/numeric/time. Closes #1038Josh Kalderimis2011-05-181-0/+2
|
* Use `Time.current` to maintain consistency with AS::DurationPrem Sichanugrist2010-09-191-2/+2
| | | | | | | | | | In [32b82e4c6f5523cdf5ee78c3022c50b46e018351], the committer has switch methods in AS::Duration to use `Time.current` to return the correct duration based on the `Time.default_zone` instead of using `Time.now`. [#5607 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-9/+9
| | | | 's/[ \t]*$//' -i {} \;)
* Bytes calculation speed upLuca Guidi2009-06-131-8/+15
| | | | | | [#2800 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix dependencies revealed by testing in isolationJeremy Kemper2009-04-221-0/+2
|
* Convert Numeric bytes and time extension modules to class reopenJeremy Kemper2009-03-282-113/+100
|
* Move Numeric#to_utc_offset_s to TimeZone.seconds_to_utc_offsetJeremy Kemper2009-03-231-15/+0
|
* Convert Numeric extension module to a class reopenJeremy Kemper2009-03-211-17/+13
|
* Deprecated Float#years and Float#months, moved Numeric#years and ↵Tom Lea2008-10-131-10/+0
| | | | Numeric#months into Integer.
* Refactor number-to-HH:MM-string conversion logic from ↵Geoff Buesing2008-01-121-0/+19
| | | | | | TimeZone#formatted_offset to reusable Numeric#to_utc_offset_s method git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8635 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make 1.months and friends accurate by introducing a Duration class. #6835 ↵Michael Koziarski2007-01-151-11/+30
| | | | | | [eventualbuddha] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Fixnum#seconds for consistency, so you can say 5.minutes + 30.seconds ↵David Heinemeier Hansson2006-03-251-0/+5
| | | | | | instead of 5.minutes + 30 (closes #4389) [Francois Beausoleil] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4029 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time#advance to do precise time time calculations for cases where a ↵David Heinemeier Hansson2006-03-161-0/+3
| | | | | | 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
* Added a note to the documentation for the Date related Numeric extensions to ↵Michael Koziarski2006-03-091-1/+6
| | | | | | | | | indicate that they're approximations and shouldn't be used for critical calculations. [Koz]. Closes #4148. References #4146 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3821 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added petabytes and exebytes to numeric extensions (closes #2397) ↵David Heinemeier Hansson2005-10-261-0/+11
| | | | | | [timct@mac.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Increased accuracy of 1.year by accounting for leap years. The time ↵Jeremy Kemper2005-06-241-2/+2
| | | | | | extensions are not meant to be super-precise but this seems worth it since otherwise you lose a lot of days doing 40.years.ago. Closes #1488 [tuxie@dekadance.se] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1499 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Moved Active Support into its own gemDavid Heinemeier Hansson2005-02-152-0/+92
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de