GothenburgBitFactory / holidata

Holidata is the core of holidata.net, a no-nonsense, ad-free provider of international holiday data.
https://holidata.net
MIT License
47 stars 13 forks source link

Add locale en-AU #84

Closed xeals closed 1 month ago

xeals commented 2 years ago

This adds the holidays for locale en-AU (addressing #69) according to relevant state and territory laws:

Outstanding issues that require resolving before this can be merged:

Additional notes:

lauft commented 2 years ago

Thanks for your contribution. I'll try to address your questions the next days.

lauft commented 2 years ago

Victoria observes a holiday for the AFL Grand Final, whose date is highly variable, falling on a Friday typically between 25 September and 2 October; a rule such as "last Friday before 2 October" misses some years Western Australia observes Queen's Birthday around a similar time, but the exact date does not follow a rule

According to the wiki article, the AFL Grand Final is a gazetted holiday. Also WA's "Queen's Birthday" is "...to be appointed for each year by proclamation published in the Government Gazette at least 3 weeks before the day so appointed". So there must be some yearly announcement which has then to be incorporated into Holidata (for both one could make an educated guess if they had not been announced yet).

The Northern Territory declares partial holidays on Christmas Eve and New Year's Eve from 7pm to 12am

Half days are not fully supported (see #36), so they can either be implemented as fulll days but with a note "7pm to 12pm", or omitted.

Several regions declare bank holidays, which are holidays observed only by financial institutions and not the general public

As with partial holidays, one could either incorporate or omit them. One could decide based on whether they are of interest for the majority/a large part of the (regional) population.

Formally all regions observe the birthday or anniversary of the reigning sovereign, which is currently Queen Elizabeth II, so the holiday is colloquially known as the Queen's Birthday. This will likely be renamed should the next sovereign not be a queen.

The best solution IMHO is to provide such a holiday by a dedicated function. A new souvereign will get a new function providing the new holiday with adapted date and name.

Different regions have differing names for Easter Saturday; in the interest of readability, these have been combined under a single holiday.

OK.

I noticed that New South Wales declares regional public holidays (specific wording) in the Public Holidays Order 2011 affecting specific local government areas. This is probably too fine-grained to include given there are no ISO codes for these regions, but I thought I'd flag it.

Yes. Currently, Holidata is restricted to regions and sub-regions as defined by ISO. Also here one could either incorporate them for the respective region with a note, or omit them.

xeals commented 2 years ago

Thanks for the feedback.

[AFL Grand Final, WA Queen's Birthday] So there must be some yearly announcement which has then to be incorporated into Holidata (for both one could make an educated guess if they had not been announced yet).

My hesitation here is that an educated guess requires correction if it's wrong, so the holiday data will require an active maintainer ~twice a year to update the fixed values.

If we could approximate a rule that gets a majority of historical dates correct, hard-code fixes for the remaining, and attach "to be confirmed" to future dates (until they can be confirmed), is that acceptable?

Half days are not fully supported, so they can either be implemented as fulll days but with a note "7pm to 12pm", or omitted. As with partial holidays, one could either incorporate or omit them. One could decide based on whether they are of interest for the majority/a large part of the (regional) population.

I was leaning towards this, so thanks for confirming it.

The best solution IMHO is to provide such a holiday by a dedicated function. A new sovereign will get a new function providing the new holiday with adapted date and name.

Noted. I suspect this may also apply to some other Commonwealth nations, but I haven't checked.

Currently, Holidata is restricted to regions and sub-regions as defined by ISO. Also here one could either incorporate them for the respective region with a note, or omit them.

My inclination is to not include them; the entire example order covers one or two hundred thousand people at most (of ~8 million), and other states would be similar.

lauft commented 2 years ago

If we could approximate a rule that gets a majority of historical dates correct, hard-code fixes for the remaining, and attach "to be confirmed" to future dates (until they can be confirmed), is that acceptable?

As the annual confirmation process will be to enter the dates for the respective year in an internal table/map/function, I would use the approximation only to provide future dates – thus hard-code all past dates.

(Queen's Birthday)... this may also apply to some other Commonwealth nations, but I haven't checked.

Yes, and not only the Commonwealth: Japan, and the Netherlands, and most likely any other country with a monarch... 🙂