aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/date
Commit message (Collapse)AuthorAgeFilesLines
* Remove deprecated `Date#to_time_in_current_zone`Vipul A M2013-07-021-15/+0
|
* The behavior we had in place in rc1 was actually to convert to DateTime and ↵David Heinemeier Hansson2013-06-031-2/+2
| | | | use <=> from there. Restore that.
* Allow Date to be compared with Time (like it was possible to compare Time ↵David Heinemeier Hansson2013-06-031-0/+11
| | | | with Date)
* Squashed commit of the following:Aaron Patterson2013-05-031-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 2683de5da85135e8d9fe48593ff6167db9d64b18 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:29:20 2013 -0700 cannot support infinite ranges right now commit cebb6acef2c3957f975f6db4afd849e535126253 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:26:12 2013 -0700 reverting infinity comparison commit 385f7e6b4efd1bf9b89e8d607fcb13e5b03737ea Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:23:28 2013 -0700 Revert "Added ability to compare date/time with infinity" This reverts commit 38f28dca3aa16efd6cc3af6453f2e6b9e9655ec1. Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/core_ext/numeric/infinite_comparable.rb activesupport/test/core_ext/date_ext_test.rb activesupport/test/core_ext/date_time_ext_test.rb activesupport/test/core_ext/numeric_ext_test.rb activesupport/test/core_ext/time_ext_test.rb activesupport/test/core_ext/time_with_zone_test.rb commit 0d799a188dc12b18267fc8421675729917610047 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:18:53 2013 -0700 Revert "Refactor infinite comparable definition a bit" This reverts commit dd3360e05e4909f2f0c74a624cccc2def688f828. commit 42dec90e49745bbfae546f0560b8783f6b48b074 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:18:47 2013 -0700 Revert "Require 'active_support/core_ext/module/aliasing' in the infinite_comparable module" This reverts commit 7003e71c13c53ec3d34250560fbf80b8381df693.
* remove unused requireTomohiko Himura2013-04-251-1/+0
| | | | not used remove_possible_method
* remove_possible_method -> remove_methodNihad Abbasov2013-01-111-2/+2
| | | | Date#to_time and Date#xmlschema methods defined in Ruby 1.9.3
* Revert some warning removals related to Ruby 2.0Carlos Antonio da Silva2013-01-071-2/+0
| | | | | | | | | | | | | | | | | | These warnings were actually a bug in Ruby 2.0, the accessors should not be raising such warnings, they are only meant for ivars. - Revert "fix warnings in Ruby 2.0" This reverts commit 26702a6d3461f4a1c75165030b96886514ecb877. - Revert "Merge pull request #8282 from arunagw/warning_removed_for_ruby2" This reverts commit f63d6544e45e78cda29c0c56fbdf3d9e1f405340, reversing changes made to 3a890681fad8218305585036abed6d7463a44e41.
* Added ability to compare date/time with infinitybUg2013-01-041-0/+5
| | | | | | | | | | | | | | | | | 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.
* Deprecate obsolete Time to DateTime fallback methodsAndrew White2012-12-111-1/+1
| | | | | | | The Time.time_with_datetime_fallback, Time.utc_time and Time.local_time methods were added to handle the limitations of Ruby's native Time implementation. Those limitations no longer apply so we are deprecating them in 4.0 and they will be removed in 4.1.
* Deprecate Date#to_time_in_current_zoneAndrew White2012-12-113-5/+27
| | | | | | | | | | | | | The to_time_in_current_zone method doesn't match the naming of the methods for converting to ActiveSupport::TimeWithZone on Time and DateTime. Since DateTime inherits from Date that has led to confusion with some users using the to_time_in_current_zone method with DateTime instances and having the time part dropped and the UTC offset lost. This commit fixes this by deprecating the old method and adding a new in_time_zone method which matches the naming for DateTime and Time. This should prevent accidently dropping times and UTC offsets when converting DateTime instances to ActiveSupport::TimeWithZone.
* Add missing at_end_of_* aliasesAndrew White2012-12-111-0/+1
|
* fix warnings in Ruby 2.0Aaron Patterson2012-11-071-0/+2
|
* keys.include? -> key?Xavier Noria2012-10-091-1/+1
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-09-213-5/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/configurable.rb activesupport/lib/active_support/core_ext/module/deprecation.rb guides/source/action_controller_overview.md guides/source/active_support_core_extensions.md guides/source/ajax_on_rails.textile guides/source/association_basics.textile guides/source/upgrading_ruby_on_rails.md While resolving conflicts, I have chosen to ignore changes done in docrails at some places - these will be most likely 1.9 hash syntax changes.
| * update AS/core_ext docs [ci skip]Francesco Rodriguez2012-09-123-5/+6
| |
* | Date.beginning_of_week thread local and beginning_of_week application config ↵gregolsen2012-09-181-0/+23
|/ | | | option added (default is Monday)
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-09-011-0/+1
|\
| * copy edits [ci skip]Vijay Dev2012-09-011-1/+1
| |
| * Expand documentation for change() method in Time, Date, and DateTimeJeff Shantz2012-08-291-0/+1
| |
* | Refactored common date and time calculations.Pan Thomakos2012-08-041-181/+2
|/ | | | | | | | * Added the `DateAndTime::Calculations` module that is included in Time and Date. It houses common calculations to reduce duplicated code. * Simplified and cleaned-up the calculation code. * Removed duplication in tests by adding a behavior module for shared tests. I also added some missing tests.
* Add prev_quarter and next_quarter method in Time/Date/DateTimeparanoiase Kang2012-06-201-0/+11
|
* Clean Date#beginning_of_month descriptionAlexey Vakhov2012-05-251-1/+1
| | | | | Unnecessary peace of text was injected at 507da04a149b44e20c5a0ba72a218fe1762b6baf by mistake.
* removing unnecessary 'examples' noise from activesupportFrancesco Rodriguez2012-05-132-4/+0
|
* String quotes and trailing spacesAlexey Gaziev2012-04-291-7/+7
|
* AS core_ext refactoringAlexey Gaziev2012-04-292-16/+41
|
* Adding :last_week, :last_month, and :last_year aliases to Time and DateMatt Bridges2012-02-211-0/+7
| | | | core extensions
* remove date methods that are present in 1.9 rubySergey Nartimov2011-12-251-20/+0
|
* Remove some of the ActiveSupport core extensions related to 1.8.Uģis Ozols2011-12-211-33/+0
|
* Initial pass at removing dead 1.8.x code from Active Support.José Valim2011-12-202-41/+0
| | | | | | There are a bunch of other implicit branches that adds 1.8.x specific code that still needs to be removed. Pull requests for those cases are welcome.
* Convert aliases monday and sunday to methodsVijay Dev2011-11-261-2/+12
| | | | | | | | A recent change to beginning_of_week and end_of_week added an argument that can be used to specify the week's starting day as a symbol. Now these methods were aliased as monday and sunday respectively which as a consequence of the argument addition, made calls like obj.monday(:sunday) possible. This commit makes them methods on their own.
* minor doc changesVijay Dev2011-11-261-3/+3
|
* some tweaks to PR#3547. [Closes #3547]Xavier Noria2011-11-251-7/+12
|
* API docstrings updated with default value infogregolsen2011-11-251-3/+3
|
* beginning_of_week extended in both Time and Date so that to return week ↵gregolsen2011-11-251-8/+16
| | | | start based on start day that is monday by default
* updating API docstring so that user can infer default valuegregolsen2011-11-171-2/+2
|
* Allow a Date to be frozen more than once without an error in Ruby 1.8.xBradley Buda2011-06-081-4/+6
|
* Remove extra white spaces on ActiveSupport docs.Sebastian Martinez2011-05-231-1/+1
|
* Merge pull request #227 from farski/masterSantiago Pastorino2011-05-111-3/+3
|\ | | | | Unnecessary redundancy in Time/Date calculations
| * Removed some redundant Time#change time options from beginning_of_ methods ↵Chris Kalafarski2011-03-131-3/+3
| | | | | | | | in Date and Time
* | Better use #remove_possible_method hereSebastian Martinez2011-05-081-2/+3
|/
* updated Time, Date and DateTime current methods in AS to use Time.zone and ↵Josh Kalderimis2011-02-282-5/+5
| | | | | | not Time.zone_default. [#6410 state:committed]
* Add Date#rfc3339 and Date#iso8601 to ASSantiago Pastorino2011-02-131-0/+6
|
* In AS, only inflector/methods is need in proxy_wrappers.rb, as well as date, ↵Josh Kalderimis2011-01-121-1/+1
| | | | | | date_time, and time conversions.rb. This fixes an issue when requiring json and AS saying that i18n is also required. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* implements weeks_ago and prev_week for Date/DateTime/Time [#5122 ↵Rob Zolkos & Xavier Noria2010-10-161-2/+14
| | | | state:committed]
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-2/+2
| | | | 's/[ \t]*$//' -i {} \;)
* itsy bitsy changes to documentationNeeraj Singh2010-07-281-13/+13
|
* Move Date#xmlschema to conversions and add a missing requireSantiago Pastorino2010-07-042-9/+10
|
* Refactor move some date, time and date_time methods to */zones and fixed ↵Santiago Pastorino2010-07-033-19/+23
| | | | some requires
* Date#since, #ago, #beginning_of_day, #end_of_day, #xmlschema return ↵Geoff Buesing2010-06-122-5/+15
| | | | | | TimeWithZone when Time.zone_default is set Signed-off-by: Xavier Noria <fxn@hashref.com>
* removes deprecations of last_(month|year) from master, they will be ↵Xavier Noria2010-05-191-11/+0
| | | | deprecated in 2.3 instead