commenthol / date-holidays-parser

parser for worldwide holidays
ISC License
46 stars 23 forks source link

Proposal: New rule for attribution of active/ inactive holidays #22

Closed commenthol closed 3 years ago

commenthol commented 3 years ago

A holiday name may change over time and get replaced or discontinued. The same applies if a holiday is effective from a certain timestamp on. Currently this is attributed by the active array using {to, from}. For renaming a name this then will case a duplication of the rule name which then is resolved with a numbering scheme using #1. This is not ideal.

It is therefore proposed to introduce a set of new rules:

<rule> since YYYY(-MM-DD)?

means that the rule is effective since year

<rule> prior to YYYY(-MM-DD)?

means that the rule is effective prior to year

<rule> since YYYY(-MM-DD)? and prior to YYYY(-MM-DD)?

means that the rule is effective since year and prior to another year

gerryster commented 3 years ago

I like this proposal. I also agree that making the month and day portions optional is reasonable as these things commonly change on calendar year boundaries.

commenthol commented 3 years ago

Great will work on the change.