Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

ActiveSupport lacks beginning_of_hour #598

lighthouse-import opened this Issue May 16, 2011 · 11 comments


None yet
2 participants

Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/2114
Created by Ryan Neufeld - 2011-02-17 06:48:07 UTC

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)

ahh, just realized this is more of a feature request :(, sorry.

Imported from Lighthouse.
Comment by Matías Flores - 2009-09-27 14:05:34 UTC

+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.

Imported from Lighthouse.
Comment by hsume2 (Henry) - 2009-09-27 14:13:25 UTC

+1, verified both patches apply successfully

Imported from Lighthouse.
Comment by Elomar França - 2009-09-27 14:52:30 UTC

+1, verified.

Agree with the addition, and both patches apply.

Imported from Lighthouse.
Comment by Mike Enriquez - 2009-09-27 19:42:39 UTC

+1 verified both patches.
It may be worth discussing if we need beginning_of_minute and beginning_of_second.

Imported from Lighthouse.
Comment by travis (at appoxy) - 2010-01-28 21:20:39 UTC


Imported from Lighthouse.
Comment by Rizwan Reza - 2010-02-12 12:46:14 UTC

[bulk edit]

Imported from Lighthouse.
Comment by Jeremy Kemper - 2010-05-04 17:48:40 UTC

[bulk edit]

Imported from Lighthouse.
Comment by Santiago Pastorino - 2011-02-02 16:54:00 UTC

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.

Imported from Lighthouse.
Comment by Oscar Del Ben - 2011-02-12 10:38:24 UTC

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?


Attachments saved to Gist: http://gist.github.com/971614

syrnick commented Apr 24, 2012

Why is it closed? I just had to add this patch to my local patches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment