Recurrence handling is missing one of the most important options: giving an end date for the repeating event (UNTIL).
$ diff -c3 recurrence.py recurrence.py.orig
*** recurrence.py 2020-05-24 00:27:54.917591200 -0400
--- recurrence.py.orig 2020-05-23 23:50:52.821505600 -0400
***************
*** 122,128 ****
freq=DAILY,
interval=None,
count=None,
- until=None,
by_second=None,
by_minute=None,
by_hour=None,
--- 122,127 ----
***************
*** 143,150 ****
positive integer representing how often the recurrence rule repeats
:param count:
number of occurrences at which to range-bound the recurrence
- :param until:
- end date of recurrence
:param by_second:
second or list of seconds within a minute. Valid values are 0 to 60
:param by_minute:
--- 142,147 ----
***************
*** 182,188 ****
.. _`RRULE format`: https://tools.ietf.org/html/rfc5545#section-3.8.5
"""
! return 'RRULE:' + Recurrence._rule(freq, interval, count, until, by_second, by_minute, by_hour, by_week_day,
by_month_day, by_year_day, by_week, by_month, by_set_pos, week_start)
@staticmethod
--- 179,185 ----
.. _`RRULE format`: https://tools.ietf.org/html/rfc5545#section-3.8.5
"""
! return 'RRULE:' + Recurrence._rule(freq, interval, count, by_second, by_minute, by_hour, by_week_day,
by_month_day, by_year_day, by_week, by_month, by_set_pos, week_start)
@staticmethod
***************
*** 190,196 ****
freq=DAILY,
interval=None,
count=None,
- until=None,
by_second=None,
by_minute=None,
by_hour=None,
--- 187,192 ----
***************
*** 211,218 ****
positive integer representing how often the recurrence rule repeats
:param count:
number of occurrences at which to range-bound the recurrence
- :param until:
- end date of recurrence
:param by_second:
second or list of seconds within a minute. Valid values are 0 to 60
:param by_minute:
--- 207,212 ----
***************
*** 250,256 ****
.. _`RRULE format`: https://tools.ietf.org/html/rfc5545#section-3.8.5
"""
! return 'EXRULE:' + Recurrence._rule(freq, interval, count, until, by_second, by_minute, by_hour, by_week_day,
by_month_day, by_year_day, by_week, by_month, by_set_pos, week_start)
@staticmethod
--- 244,250 ----
.. _`RRULE format`: https://tools.ietf.org/html/rfc5545#section-3.8.5
"""
! return 'EXRULE:' + Recurrence._rule(freq, interval, count, by_second, by_minute, by_hour, by_week_day,
by_month_day, by_year_day, by_week, by_month, by_set_pos, week_start)
@staticmethod
***************
*** 399,405 ****
freq=DAILY,
interval=None,
count=None,
- until=None,
by_second=None, # BYSECOND
by_minute=None, # BYMINUTE
by_hour=None, # BYHOUR
--- 393,398 ----
***************
*** 420,427 ****
positive integer representing how often the recurrence rule repeats
:param count:
number of occurrences at which to range-bound the recurrence
- :param until:
- end date of recurrence
:param by_second:
second or list of seconds within a minute. Valid values are 0 to 60
:param by_minute:
--- 413,418 ----
***************
*** 490,502 ****
raise ValueError('"count" parameter must be a positive int. '
'{} was provided'.format(count))
- if until:
- if not isinstance(until, (date, datetime)):
- msg = 'The until object must be a date or datetime, not {!r}.'.format(end.__class__.__name__)
- raise TypeError(msg)
- else:
- until = until.strftime("%Y%m%dT%H%M%SZ")
-
by_second = assure_iterable(by_second)
check_all_type_and_range(by_second, int, (0, 60), "by_second")
--- 481,486 ----
***************
*** 537,543 ****
rule_properties = (
('INTERVAL', interval),
('COUNT', count),
- ('UNTIL', until),
('BYSECOND', to_string(by_second)),
('BYMINUTE', to_string(by_minute)),
('BYHOUR', to_string(by_hour)),
--- 521,526 ----