azuyalabs/yasumi

"Fronleichnam" missing as official Holiday

pete1019 opened this issue · 20 comments

Hi,

"Fronleichnam" is missing as official holiday today. Why is that?
Not listed in NRW nor Bayern. Don't know if others are missing, too.

Thanks a lot

Hi, Could you share some sample code that shows the holiday is missing? Thanks!

Sure:

`
...
$official = new Yasumi\Filters\OfficialHolidaysFilter($ho->getIterator());
foreach ($official as $h) {
if (strval($d) === strval($h))
die('isholiday');
}
die("notholiday");
....
}

`

And this is the List for NRW:
2021-01-01: newYearsDay
2021-04-02: goodFriday
2021-04-05: easterMonday
2021-05-01: internationalWorkersDay
2021-05-13: ascensionDay
2021-05-24: pentecostMonday
2021-10-03: germanUnityDay
2021-12-25: christmasDay
2021-12-26: secondChristmasDay

And today is missing for "Hessen" and "Bayern" as well...maybe others, too.

Thanks!

Thanks for the example. I just found out that Corpus Christi is by default set to 'Other' which is likely the most sensible classification for any country that celebrates it. This is the case for Germany (and it's states) as well. Hence why these don't show up.

A reclassification for the respected states is then necessary in Yasumi.

Thanks. When might a fix be available?

Since this issue has not had any activity within the last 90 days, I have marked it as stale.
I will close it if no further activity occurs within the next 10 days.

Hi, any news on this? Thanks a lot

Fronleichnam wird in folgenden Bundesländern als Feiertag begangen:

-Baden Württemberg
-Bayern
-Hessen
-Nordrhein-Westfalen
-Rheinland-Pfalz
-Saarland

I will look into it this week. Thanks for the reminder!

@pete1019 I have created a PR that will fix this issue. If you like to verify, please have a look at this PR.

Thanks, how can i download and check?

You can checkout the fronleichnam-fix branch.

ahh you mean this:
https://github.com/azuyalabs/yasumi/tree/fronleichnam-fix

okay i will test it and let you know.

i tried downloading the code.zip and tried to replace the src folder but i got and internal server error.
I had it working with composer before.
How to get the fix "composer-friendly"?
PHP 7.2

Thanks

@pete1019 I don't think that would work indeed. If you want to go the Composer route, you would need to change the Yasumi version in your composer.json with the desired branch (see: https://getcomposer.org/doc/articles/aliases.md#why-aliases-)

You can also checkout the branch with Git and have your script point to that.

@stelgenhof thanks and how will i deal with this on 2.4.0?

  • Removed PHP 7.2 Support (PHP 7.2 is EOL)

I can not upgrade PHP 7.2 at this point.

Is your fix only available for 2.4.0 which does not have PHP 7.2 support anymore?
https://github.com/azuyalabs/yasumi/tree/fronleichnam-fix

THANKS!

@pete1019 It will be fixed in the upcoming 2.5.0 release. 2.4 and 2.5 have support for PHP7.3 or higher as these are the official supported PHP versions.

@stelgenhof so i am out of luck with PHP 7.2 for now? I need to upgrade to 7.3?
You used special PHP 7.3 functions or is it just coded that PHP 7.2 is not allowed to use with YASUMI anymore?
Thanks.

@pete1019 Don't know by heart but probably some specific 7.3 syntax indeed is used since 2.4.

@pete1019 Were you able to do some checks?

@stelgenhof unfortunately not since the PBX i am using it on still is on PHP 7.2. Hope at least PHP 7.3 in the next weeks / months.

@pete1019 I went ahead and merging your PR. I am aware you may not have time yet to check everything, however if we find some issues we can always fix them at any time.