jollyday icon indicating copy to clipboard operation
jollyday copied to clipboard

Removing a parent holiday from a subconfiguration

Open ramsestom opened this issue 6 years ago • 2 comments

Is there a way to define, in a subconfiguration, that an Holiday in the parent configuration shouldn't be an Holiday for this subconfiguration? For example, if you take the city of berkeley, in California USA, according to wikipedia (https://en.wikipedia.org/wiki/Public_holidays_in_the_United_States#Berkeley,_California) Cesar Chavez Day is not an Holiday whereas it is for the rest of the California state. But with the rules defined in the Holiday_us.xml file (https://github.com/svendiedrichsen/jollyday/blob/master/src/main/resources/holidays/Holidays_us.xml), Cesar Chavez Day would be defined as an Holiday in Berkeley as a subconfiguration inherit all the holidays from its parent configuration (and California has CESAR_CHAVEZ defined as an Holiday).

ramsestom avatar Aug 22 '18 02:08 ramsestom

No, currently the there is no way to remove holidays in subconfigurations. You could only remove it from the parent and add it to all subconfigurations that have it. Which may mean to have to create new subconfigurations and add it to all of them. Sorry. For example remove it from California and create subconfigurations for every district that has it. If it is determined by district.

Sorry, I'm not from the US so can't really say how to best divide the state of California into subcategories to have the holidays added for each of it.

svendiedrichsen avatar Aug 31 '18 18:08 svendiedrichsen

Another example is President's day which is All except DE, GA, IA, IN, KS, KY, LA, NC, NM, RI, WI according to https://www.timeanddate.com/holidays/us/. Easier to define it once in the parent and remove it from the exceptions than define it in every state that observes it.

rocketraman avatar Mar 25 '21 22:03 rocketraman