Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

ActiveSupport lacks beginning_of_hour #598

Closed
lighthouse-import opened this Issue · 11 comments

2 participants

Lighthouse Import Alexander Sorokin
Lighthouse Import

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)
end

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

Lighthouse Import

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.

Lighthouse Import

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

+1, verified both patches apply successfully

Lighthouse Import

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.

Lighthouse Import

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.

Lighthouse Import

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

+1

Lighthouse Import

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

[bulk edit]

Lighthouse Import

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

[bulk edit]

Lighthouse Import

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.

Lighthouse Import

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?

[state:open]

Alexander Sorokin

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
Something went wrong with that request. Please try again.