imiptools/dates.py | raw changeset files shortlog |
1.1 --- a/imiptools/dates.py Tue Feb 03 19:29:38 2015 +0100 1.2 +++ b/imiptools/dates.py Tue Feb 03 19:31:08 2015 +0100 1.3 @@ -197,4 +197,13 @@ 1.4 1.5 return format_datetime(to_timezone(datetime.utcnow(), "UTC")) 1.6 1.7 +def next_date(s): 1.8 + 1.9 + """ 1.10 + Return an iCalendar-compatible string indicating the next date after the one 1.11 + provided by 's'. 1.12 + """ 1.13 + 1.14 + return format_datetime(get_datetime(s) + timedelta(1)) 1.15 + 1.16 # vim: tabstop=4 expandtab shiftwidth=4