delorean
delorean copied to clipboard
Adding functionality with start_of_* and end_of_*
Hey, Yusuf! You did a great job with this lib!
Have you thought about extending current functionality of start_of_day
and end_of_day
in same manner as next_*
and last_*
?
I was looking for a convenient way to get last day of previous month and I haven't found any.
Example of what I'm talking about:
>>> print Delorean().last_month().end_of_month()
Delorean(datetime=datetime.datetime(2016, 3, 31, 23, 59, 59, 999999), timezone='UTC')
Thanks!
indeed start_of_month
and especially end_of_month
brought me here to try out delorean, which it sadly can't support. I would also need something like. Delorean().end_of_month().last_friday() - timedelta(weeks=1)
... but looks like the last commit was 2 years ago and this issue is open for 5 years .... so, most likely not happening. Using now pendulum, not quite as nice but works.