focus-shift / jollyday

Jollyday - A worldwide public holidays library
Apache License 2.0
79 stars 23 forks source link

Improve holiday types with bank holidays #462

Closed derTobsch closed 1 month ago

derTobsch commented 8 months ago

More information

At the moment we have two holiday types. Official and Unofficial Holidays, but there are holiday in different countries that belong to e.g. Bank, School or Authorities Holidays. We want to improve the HolidayTypes Enum to represent this kind of holiday types.

At first we will add the possibility to add:

theGreski commented 8 months ago

Could you describe the proposed changes meanings, please. Does the "School Holidays" represent when schools are closed? What's the purpose of "Authorities"?

derTobsch commented 8 months ago

Could you describe the proposed changes meanings, please. Does the "School Holidays" represent when schools are closed? What's the purpose of "Authorities"?

I added a section in the readme on the branch. Is that sufficient?

theGreski commented 8 months ago

I added a section in the readme on the branch. Is that sufficient?

You're sound man :+1:

derTobsch commented 8 months ago

I added a section in the readme on the branch. Is that sufficient?

You're sound man 👍

Did you took a look?

The following holiday types are supported:

| Type        | Description                                                                                                          |
|-------------|----------------------------------------------------------------------------------------------------------------------|
| Official    | Official public holiday                                                                                              |
| Bank        | Bank holiday, banks and offices are closed                                                                           |
| School      | School holiday, schools are closed                                                                                   |
| Authorities | Authorities are closed                                                                                               |
| Unofficial  | Unofficial holiday that is no <br/>Bank, School or Authorities holiday <br/>(Deprecated, please use the other types) |

I think I will enhance this table with a column of official yes/no

theGreski commented 8 months ago

Just thinking, it might be very tricky with schools, as various types may have different timings, e.g. creche (kindergarten), primary, secondary, universities, etc... They all might have their own timings. For instance in Ireland all those types have different patterns. In Poland it goes by regions.

derTobsch commented 7 months ago

Just thinking, it might be very tricky with schools, as various types may have different timings, e.g. creche (kindergarten), primary, secondary, universities, etc... They all might have their own timings. For instance in Ireland all those types have different patterns. In Poland it goes by regions.

Good objection, I think it would be enough for the start to only add Bank holidays additionally to Official and Unofficial

derTobsch commented 7 months ago

I thought about this. I think we need to do two things.

@XSpielinbox any thoughts about this?

XSpielinbox commented 7 months ago

I thought about this. I think we need to do two things.

* Rename the 'official holiday' to 'public holiday', because this is what it is. see [Rename 'Official Holiday' to 'Public Holiday' #482](https://github.com/focus-shift/jollyday/issues/482)

* Add bank holiday and provide the bank holidays for the specific countries. see [Add new holiday type bank and rename official holiday to public holiday #467](https://github.com/focus-shift/jollyday/pull/467)

@XSpielinbox any thoughts about this?

Do you have a definition of "official holiday", "public holiday" and "bank holiday" you are following here?

If so, this should be written down in an ADR.

Because, as far as I can tell the meaning of these words might slightly differ from country to country / source to source.

Is is documented in the readme on the branch.

The following holiday types are supported:

Type Description
Public Public holiday
Bank Bank holiday, banks and offices are closed

I know that there are different definitions, especially in Scotland, England, ...., but I followed https://www.officeholidays.com/about/definitions and https://en.wikipedia.org/wiki/Public_holiday e.g. In these cases I would say, that a public holiday is "...generally established by law and is usually a non-working day during the year".

A bank holiday is a day where the bank and offices are closed and is not a public holiday.

So with these definitions there are mostly public holidays in this library and some bank holidays e.g. in Scotland. But the bank holidays in England are only named "bank holidays" but are normal public holidays.

XSpielinbox commented 7 months ago

@derTobsch Thank's for the explanation.

Sounds good.

Just a side note: From understand the Scottish Government websites, the current holidays are actual public holiday in that sense, that not only banks are closed, as indicated by the linked officeholidays.com website, but this can then be discussed in a separate issue, if necessary.

derTobsch commented 1 month ago

see #537 for more information