Added Time#middle_of_day method#10879
Conversation
|
I looked at #10878 and still doesn't see a rationale behind this. Would you mind telling us why this is useful to add? |
|
@sikachu sure When one need to make a query relative to middle of the day (for example to show weather data, I faced this situation today) this method might be useful. Also there is For sure initializer is a good place for keeping extensions like this, it is not a problem. |
|
/cc @pixeltrix |
|
@makaroni4 needs adding to |
|
Thinking about it, adding |
|
@pixeltrix thx, I will add
There is no opposite method for |
|
There is |
|
Both hands are up for the |
|
This might be usefull |
|
Interesting, could potentially find this useful. @makaroni4 are you going to add this to |
|
Hi, @schneems! For sure, give me couple of minutes. |
|
@pixeltrix @schneems done. I added methods for both I see duplications of methods like beginning_of_day, end_of_day in |
|
@steveklabnik could you please take a look? This one should be either merged or closed 😃 |
|
I like to let @pixeltrix merge stuff related to time. |
|
@pixeltrix aka Kronos, god of the time 😁 |
|
@makaroni4 I hadn't merged it yet because the build failed and I thought you might be adding the other methods that had been suggested. No matter - can you check out why the tests are failing and update the PR. There is a significant amount of duplication between |
|
@pixeltrix I see that it was activerecord test failed: Could you please restart the build (I probably have no access, because button is locked on Travis)? I have no such an error on my local machine. |
|
@pixeltrix the build is green 😄 👍 You rebuilt it or how did it happen? I will work on DRYing date and time modules in the next PR (as long as |
|
@makaroni4 can you squash the commits - once you've done that I'll merge 👍 |
Added middle_of_day method to Date and DateTime
|
@pixeltrix the build is failed again due to bundler error in AR tests: https://travis-ci.org/rails/rails/jobs/9582396 |
|
@makaroni4 rebuilding that job now - we're nearly there 😄 |
|
😄 |
Added Time#middle_of_day method
|
@makaroni4 thanks for you contribution and your patience ❤️ |
|
Yay! @pixeltrix thank you very much 😃 ❤️ |
|
BTW, what about changelog? |
|
Huge 👍 for CHANGELOG. Added |
|
@rafaelfranca sorry, I am late (back to school 😃 ) Thanks a lot for the CHANGELOG 👍 |
No description provided.