From 05b97189c9c9eb094979337171ff71292b5f41e6 Mon Sep 17 00:00:00 2001 From: commenthol Date: Mon, 3 Jan 2022 08:31:33 +0100 Subject: [PATCH] docs: update spec --- docs/specification.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/specification.md b/docs/specification.md index 57643912f..498a68834 100644 --- a/docs/specification.md +++ b/docs/specification.md @@ -1,6 +1,6 @@ # Specification for `holidays.yaml` -Version: 2.0.0 +Version: 2.1.0 This document describes the data contained within the files `holidays.yaml` and `names.yaml`. @@ -523,6 +523,25 @@ Where: - `09-22 if 09-21 is holiday` is September 22nd is public holiday only if September 21st is also a holiday - `09-22 if 09-21 and 09-23 is public holiday` is September 22nd is public holiday only if September 21st and September 23rd are public holidays +### Change to different weekday if date already falls on a holiday + +Rule: ` if is ()? holiday then ()? (next|previous) ` + +Rule: ` if is ()? holiday then ()? (next|previous) day (omit )?` + +Where: +- `` any rule +- `` public, bank, school, observance, optional (defaults to public if omitted) +- `` 1...31, 1st, 2nd, 3rd +- `` Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday +- `` Comma separated list of `` + +**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` + ### Enabling a rule since or in certain years > __Note:__ Use quotes around dates!