freekmurze,
@freekmurze@phpc.social avatar

We released a mini package to calculate public holidays in a country.
https://github.com/spatie/holidays

We've made this package for our own nPRss and packaged it, so you don't have to code it up in your project.

Right now Belgium, Netherlands and Hungary are supported, but we welcome PRs to add support for more countries 👍

rauhvargers,

@freekmurze will try to add Latvian holidays later. The yearTooHigh exception makes me sad, however.

freekmurze,
@freekmurze@phpc.social avatar

@rauhvargers I’ll refactor that away soon 👍

michael,
@michael@thms.uk avatar

@freekmurze Just wondering: what's the advantage of this package over packages such as org_heigl/holidaychecker and/or cmixin/business-day for example?

(Also, to be honest, this comment made me laugh: That might be true in Europe, but definitely not true in many many countries - even in the UK most holidays have no relation with Easter).

Not trying to discredit your work at all! Just curious.

freekmurze,
@freekmurze@phpc.social avatar

@michael I didn't know of the other packages :-)

We can always refactor that date check when supporting countries that don't follow easter 👍

michael,
@michael@thms.uk avatar

@freekmurze Fair enough! I've used the cmixin one for years, and it works very reliably for us.

Some countries have ... shall we say weird … holiday rules.

Did you know that we in the UK had three extra holidays over the last two years that followed no rules at all simply because the monarch wanted it?

Not to mention Muslim countries where religious holidays are often only confirmed weeks in advance depending on moon observations, which can be impacted by cloud cover etc.

Fun stuff …

heiglandreas,
@heiglandreas@phpc.social avatar

@freekmurze Feel free to use https://packagist.org/packages/org_heigl/holidaychecker to get support for more countries.

heiglandreas,
@heiglandreas@phpc.social avatar

@freekmurze Though Hungary is currently not supported. Might change that on the weekend though 😉

heiglandreas,
@heiglandreas@phpc.social avatar

@freekmurze PR needs to pass tests and will then get merged...

https://github.com/heiglandreas/holidayChecker/pull/170

heiglandreas,
@heiglandreas@phpc.social avatar

@freekmurze Voila! Hungarian holidays (amongst others) are available with the latest release v0.6.3 (https://github.com/heiglandreas/holidayChecker/releases/tag/0.6.3)

freekmurze,
@freekmurze@phpc.social avatar

@heiglandreas Seems like I'm getting PRs for all other countries 😅

heiglandreas,
@heiglandreas@phpc.social avatar

@freekmurze 🤷

Go for it.

heiglandreas,
@heiglandreas@phpc.social avatar

@freekmurze And I am interested in tue Bamgladesh one. As the official bengali calendar is not available in ICU. So calculating them is... currently impossible!

heiglandreas,
@heiglandreas@phpc.social avatar

@freekmurze As I thought... 🤷

Calendaring isn't as easy as it looks at first sight.

freekmurze,
@freekmurze@phpc.social avatar

@heiglandreas Nice, didn't know of that one!

tobiaskoengeter,
@tobiaskoengeter@sueden.social avatar

@heiglandreas @freekmurze and here‘s our dataset including a REST API: https://www.calidar.io/de-de/land.html 😄

heiglandreas,
@heiglandreas@phpc.social avatar

@tobiaskoengeter Would love to chat about that! On first sight I am missing some things.

Feel free to drop me an email if you're interested.

/cc @freekmurze

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ethstaker
  • DreamBathrooms
  • mdbf
  • InstantRegret
  • ngwrru68w68
  • magazineikmin
  • everett
  • thenastyranch
  • Youngstown
  • slotface
  • cisconetworking
  • kavyap
  • osvaldo12
  • modclub
  • megavids
  • GTA5RPClips
  • khanakhh
  • tacticalgear
  • Durango
  • rosin
  • normalnudes
  • Leos
  • provamag3
  • tester
  • cubers
  • anitta
  • JUstTest
  • lostlight
  • All magazines