commenthol / date-holidays

worldwide holidays
https://commenthol.github.io/date-holidays/
Other
906 stars 234 forks source link

Inccorect rule for finnish new year's eve #392

Closed jukkaleh-atoz closed 1 year ago

jukkaleh-atoz commented 1 year ago

FI.yaml contains the following rule for new year's eve "12-31 14:00 if sunday then 00:00": https://github.com/commenthol/date-holidays/blob/863782acaf3b46df3429190b72d7b86bc229801b/data/countries/FI.yaml#L57

There is no rule in Finland that eve starts at 14:00 unless it's sunday. 2023 happens to return correct date and time but for example 2021 does not.

Workaround:

  const hd = new Holidays("FI");
  hd.unsetRule("12-31 14:00 if sunday then 00:00");
  hd.setHoliday("12-31", {
    name: "Uudenvuodenaatto",
    type: "bank",
  });