Right now, if you enter 1 month, then convert it into a timedelta as such:
datetime.timedelta(seconds=parse('1 month'))
Then, if you add that timedelta to a datetime, the value will be incorrect in certain months, as per the readme:
For months and years, the library does not consider complications such as leap- years and leap-seconds. Instead, it assumes "30 days for a month" and "365 days for a year" as the basis for calculations with those units.
It would be helpful to have a convert to timedelta option to handle stuff like this.
Right now, if you enter
1 month, then convert it into a timedelta as such:Then, if you add that timedelta to a datetime, the value will be incorrect in certain months, as per the readme:
It would be helpful to have a convert to timedelta option to handle stuff like this.