myusuf3 / delorean

Delorean: Time Travel Made Easy
http://delorean.rtfd.org/
MIT License
1.84k stars 128 forks source link

add last second method to get the previous second. #25

Open myusuf3 opened 11 years ago

myusuf3 commented 11 years ago

This becomes extremely useful when trying to get the last second of the day, or maybe come up with a generic way to get this.

ulope commented 11 years ago

Arrow merged this with truncation into the floor and ceil operations. Maybe a good idea to "steal"?

myusuf3 commented 11 years ago

@ulope link to what are you are talking about?

myusuf3 commented 11 years ago

nevermind!

ulope commented 11 years ago

Yeah sorry: http://crsmithdev.com/arrow/#arrow.arrow.Arrow.floor

myusuf3 commented 9 years ago

I have just fixed #38 that combined with the truncations should give you desire result. I might revisit this in the future, I do like idea of ceiling and floor but I currently hate arrow api. @mlew ideas on a nicer API for this?

mlew commented 9 years ago

I actually like the interface in arrow for this. I think it's generic and simple. I actually feel like start_of_day and end_of_day methods are too specific.