focus-shift / jollyday

Jollyday - A worldwide public holidays library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve holiday types with bank holidays

derTobsch opened this issue · comments

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:

  • Bank Holidays

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

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?

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

You're sound man 👍

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

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.

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

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 #482
  • Add bank holiday and provide the bank holidays for the specific countries. see #467

@XSpielinbox any thoughts about this?

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.

@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.