[Gerrit] >> I am in favour of including something like DatuUtil in the standard >> library. I need it often enough, e.g., to find out out when two >> weeks after 24 Feb is is easier with DateUtil than with datetime, >> ... [Brett] > And if you want a poor man's way of finding the date a specific number > of days past a date you can add those number of days to the day of the > year value and then pass in the year and day of year into strptime and > it will calculate the new date for you. Roundabout, yes, but it > works. =) Obviously DateUtil is a much better way to handle this. I'm not grasping the perceived difficulty with this specific use case: >>> import datetime >>> datetime.date(2004, 2, 24) + datetime.timedelta(weeks=2) datetime.date(2004, 3, 9) >>> I suppose it's possible that Gerrit finds "relativedelta" easier to type for some reason <wink>.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4