1.1 --- a/imiptools/dates.py Mon May 18 00:26:37 2015 +0200
1.2 +++ b/imiptools/dates.py Mon May 18 00:28:53 2015 +0200
1.3 @@ -431,7 +431,16 @@
1.4
1.5 return dtstart_attr and dtstart_attr.get("TZID") or dtend_attr and dtend_attr.get("TZID") or None
1.6
1.7 -def get_recurrence_start(recurrenceid, tzid):
1.8 +def get_recurrence_start(recurrenceid):
1.9 +
1.10 + """
1.11 + Return 'recurrenceid' in a form suitable for comparison with period start
1.12 + dates or datetimes.
1.13 + """
1.14 +
1.15 + return get_datetime(recurrenceid)
1.16 +
1.17 +def get_recurrence_start_point(recurrenceid, tzid):
1.18
1.19 """
1.20 Return 'recurrenceid' in a form suitable for comparison with free/busy start
1.21 @@ -440,13 +449,22 @@
1.22
1.23 return to_utc_datetime(get_datetime(recurrenceid), tzid)
1.24
1.25 -def to_recurrence_start(recurrenceid, tzid):
1.26 +def to_recurrence_start(recurrenceid):
1.27 +
1.28 + """
1.29 + Return 'recurrenceid' in a form suitable for use as an unambiguous
1.30 + identifier.
1.31 + """
1.32 +
1.33 + return format_datetime(get_recurrence_start(recurrenceid))
1.34 +
1.35 +def to_recurrence_start_point(recurrenceid, tzid):
1.36
1.37 """
1.38 Return 'recurrenceid' in a form suitable for use as an unambiguous
1.39 identifier, using 'tzid' to convert recurrence identifiers that are dates.
1.40 """
1.41
1.42 - return format_datetime(get_recurrence_start(recurrenceid, tzid))
1.43 + return format_datetime(get_recurrence_start_point(recurrenceid, tzid))
1.44
1.45 # vim: tabstop=4 expandtab shiftwidth=4