jollyday
jollyday copied to clipboard
Removing a parent holiday from a subconfiguration
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).
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.
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.