recurrence: add last-day-of-month
This commit is contained in:
parent
18f194caa5
commit
181f7405d6
5 changed files with 79 additions and 8 deletions
|
@ -245,6 +245,17 @@ class PlannerTestCase(object):
|
|||
[date(2022, 5, 11), date(2022, 6, 8), date(2022, 7, 13),
|
||||
date(2022, 8, 10), date(2022, 9, 14), date(2022, 10, 12)])
|
||||
|
||||
# last day of month
|
||||
self.assertEqual(
|
||||
job._compute_dates_by_rrule(
|
||||
query_date=date(2022, 5, 1), count=6,
|
||||
params={
|
||||
'weekday': '99', 'end_date': None, 'frequ': 'month',
|
||||
'interval': 1, 'setpos': None, 'monthday': None,
|
||||
'last_day_of_month': True}),
|
||||
[date(2022, 5, 31), date(2022, 6, 30), date(2022, 7, 31),
|
||||
date(2022, 8, 31), date(2022, 9, 30), date(2022, 10, 31)])
|
||||
|
||||
# set up holidays
|
||||
cfg1 = Config(
|
||||
holidays='01-01;05-01;easter:+1;easter:-2;ascension;whitsun:+1')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue