Invalid procedure rectificationPeriod.endDate calculation
Sample data:
rect_period_start_date = datetime.datetime(2020, 5, 7, 16, 25, 28, tzinfo=<DstTzInfo 'Europe/Kiev' EEST+3:00:00 DST>)
rect_period_end_date = datetime.datetime(2020, 5, 11, 18, 0, tzinfo=<DstTzInfo 'Europe/Kiev' EEST+3:00:00 DST>)
Spec: rectificationPeriod.endDate - rectificationPeriod.startDate) equals 2 business days, starting from next day after procedure creation.
Calculation: First business day: 2020/5/8 (Nearest business day after 2020/5/7) Second business day: 2020/5/12 (As 9,10 - weekn-ed, 11-holiday)
So, final rectificationPeriod.endDate should be 2020/5/12 for this and other similar cases.
##############################################################################################################
BUG REASONS:
Holiday dates in kube after YAML safe load
{'holidays': ['2020-01-01', '2020-01-06', '2020-01-07', '2020-03-09', '2020-04-20', '2020-05-01', '2020-05-11','2020-06-08', '2020-06-29', '2020-08-24', '2020-10-14', '2020-12-25'], 'timezone': 'Europe/Kiev', 'weekends': ['Saturday', 'Sunday'], 'working_days': ['2020-01-11']}
Holiday dates in compose after YAML safe load
{'weekends': ['Saturday', 'Sunday'], 'holidays': [datetime.date(2020, 1, 1), datetime.date(2020, 1, 6), datetime.date(2020, 1, 7), datetime.date(2020, 3, 9), datetime.date(2020, 4, 20), datetime.date(2020, 5, 1), datetime.date(2020, 5, 11), datetime.date(2020, 6, 8), datetime.date(2020, 6, 29), datetime.date(2020, 8, 24), datetime.date(2020, 10, 14), datetime.date(2020, 12, 25)], 'working_days': [datetime.date(2020, 1, 11)], 'timezone': 'Europe/Kiev'}
Date config file from kube
holidays:
- "2020-01-01"
- "2020-01-06"
- "2020-01-07"
- "2020-03-09"
- "2020-04-20"
- "2020-05-01"
- "2020-05-11"
- "2020-06-08"
- "2020-06-29"
- "2020-08-24"
- "2020-10-14"
- "2020-12-25" timezone: Europe/Kiev weekends:
- Saturday
- Sunday working_days:
- "2020-01-11"