Closed commenthol closed 2 years ago
This PR adds a new rule which moves a holiday in case that day already observes a different holiday.
Rule: <rule> if is (<type>)? holiday then (<count>)? (next|previous) <weekday>
<rule> if is (<type>)? holiday then (<count>)? (next|previous) <weekday>
Rule: <rule> if is (<type>)? holiday then (<count>)? (next|previous) day (omit <weekdays>)?
<rule> if is (<type>)? holiday then (<count>)? (next|previous) day (omit <weekdays>)?
Where:
<rule>
<type>
<count>
<weekday>
<weekdays>
Examples:
Thursday after 04-02 if is observance holiday then next Thursday
03-01 and if Saturday, Sunday then next Monday if is holiday then 2nd next Tuesday since 2022
05-01 if is public holiday then 2nd next day omit Saturday, Sunday
This PR adds a new rule which moves a holiday in case that day already observes a different holiday.
Change to different weekday if date already falls on a holiday
Rule:
<rule> if is (<type>)? holiday then (<count>)? (next|previous) <weekday>
Rule:
<rule> if is (<type>)? holiday then (<count>)? (next|previous) day (omit <weekdays>)?
Where:
<rule>
any rule<type>
public, bank, school, observance, optional (defaults to public if omitted)<count>
1...31, 1st, 2nd, 3rd<weekday>
Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday<weekdays>
Comma separated list of<weekday>
Examples:
Thursday after 04-02 if is observance holiday then next Thursday
03-01 and if Saturday, Sunday then next Monday if is holiday then 2nd next Tuesday since 2022
05-01 if is public holiday then 2nd next day omit Saturday, Sunday