You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dateutil.relativedelta allows searching for the next monday or previous tuesday, and so on:
from dateutil.relativedelta import relativedelta, MO
n = arrow.utcnow()
n
>>> <Arrow [2013-10-22T10:19:37.595000+00:00]>
n + relativedelta(weekday=MO(+1))
>>> <Arrow [2013-10-28T10:19:37.595000+00:00]>
n + relativedelta(weekday=MO(-1))
>>> <Arrow [2013-10-21T10:19:37.595000+00:00]>
Actually, no need to cut the features of the dateutil you're using anyway.
Opinions?
The text was updated successfully, but these errors were encountered:
I like the idea, except I would want to avoid having to import special symbols (MO, etc.) to make this work. Let me see if I can come up with a nice way of implementing this without.
dateutil.relativedelta will replace weekday=0-6 with the correct weekday() instance. I'm thinking all you need to do to get the basic functionality working is add weekday to self._ATTRS_PLURAL in arrow.py.
dateutil.relativedelta
allows searching for the next monday or previous tuesday, and so on:Actually, no need to cut the features of the
dateutil
you're using anyway.Opinions?
The text was updated successfully, but these errors were encountered: