This project is archived and is in readonly mode.
ActiveSupport lacks beginning_of_hour
Reported by Ryan Neufeld | March 3rd, 2009 @ 03:49 AM | in 3.x
Needed something to give me the beginning of the hour but it appears ActiveSupport lacks that. Code below
def beginning_of_hour
change(:min => 0, :sec => 0, :usec => 0)
end
ahh, just realized this is more of a feature request :(, sorry.
Comments and changes to this ticket
-
Matías Flores September 27th, 2009 @ 03:03 PM
- Tag changed from activesupport to activesupport, bugmash
-
Matías Flores September 27th, 2009 @ 03:05 PM
+1 for the feature
I've attached a patch adding beginning_of_hour and end_of_hour support. Notice that there are two patch files, the first one applies to master and the other to 2-3-stable.
-
Elomar França September 27th, 2009 @ 03:52 PM
+1, verified.
Agree with the addition, and both patches apply.
-
Mike Enriquez September 27th, 2009 @ 08:42 PM
+1 verified both patches. It may be worth discussing if we need beginning_of_minute and beginning_of_second.
-
Rizwan Reza February 12th, 2010 @ 12:46 PM
- Tag changed from activesupport, bugmash to activesupport
-
Santiago Pastorino February 2nd, 2011 @ 04:54 PM
- State changed from new to open
- Importance changed from to
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino February 2nd, 2011 @ 04:54 PM
- State changed from open to stale
-
Oscar Del Ben February 12th, 2011 @ 10:38 AM
- State changed from stale to open
This hasn't been added to rails 3. Before rolling out a patch again is the core team interested at all in adding the feature?
[state:open]
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>