heiglandreas,
@heiglandreas@phpc.social avatar

So I thought I could add some more countries to https://packagist.org/packages/org_heigl/holidaychecker after adding a small change to the schema to accommodate holidays that only occur every x years.

O boy.....

First the rabbit-hole with the XSD-validation for an attribute that requires a second (I skipped the requirement) and then some tests failed ...

I currently think it's due to some ICU changes. So for the last hour I now try to debug why setting the month of an IntlCalendar doesn't ... set the month 🤦‍♂️

SenseException,
@SenseException@phpc.social avatar

@heiglandreas Do you create it from DateTime?

heiglandreas,
@heiglandreas@phpc.social avatar

@SenseException Nope.

See here: https://gist.github.com/heiglandreas/e33c695e9aaaf14d459cf0789318d41e

Seems to be an issue with the chinese calendar that occured in the last 3 month as https://github.com/heiglandreas/holidayChecker/actions/runs/3983907919/jobs/6829635236 worked as expected....

heiglandreas,
@heiglandreas@phpc.social avatar

@SenseException So it's not only the chinese calendar:

https://gist.github.com/heiglandreas/763ea6974f4355d12fcddc5f897de24a

It's the chinese, dangi, indian and persian calendar.... 😕

SenseException,
@SenseException@phpc.social avatar

@heiglandreas Months don't necessarily have the same length. I wonder if this is an ICU issue.

heiglandreas,
@heiglandreas@phpc.social avatar

@SenseException It worked until 3 months ago. So I doubt that it has something to do with different months lengths. That is exactly what I'm trying to do with that ;-)

I was already checking the sources of ICU4C but couldn't find anything. OTOH my C isn't that good...

As it is specific to calendars that seem to be based on the chinese one I doubt that it is an issue in PHP.

SenseException,
@SenseException@phpc.social avatar

@heiglandreas Did you compared the versions or is this already the newest version? Does this behaviour appear elsewhere with the same version?

heiglandreas,
@heiglandreas@phpc.social avatar

@SenseException happens with all icu versions since 66.1 and all php versions since 7.4.

But 3 months ago with the shivamatur php on githubactions it just worked out of the box.

Though there have been timezone updates so I'll test with another timezone tomorrow....

heiglandreas,
@heiglandreas@phpc.social avatar

@SenseException Other Timezone doesn't change anything.

And different monthlengths also should not be an issue as I called set(IntlCalendar::DAY_OF_MONTH, 1) before setting the month. And IIRC ALL months in ALL calendars have a day 1.... Though... we are talking about calendars here....

SenseException,
@SenseException@phpc.social avatar

@heiglandreas You're only using a keyword in the locale. Does the same happen when you use the chinese locale with it?

I can use a calender called "lol" as locale in your example and PHP is fine with it. The result with lol is

int(3)
int(0)

heiglandreas,
@heiglandreas@phpc.social avatar

@SenseException the locale is irrelevant for the calendaring functions. And it happens with other calendars as well I've seen. Hebrew for example works with "0" but not with "5". Needs more investigation...

SenseException,
@SenseException@phpc.social avatar

@heiglandreas It was a shot in the dark from my time when I was creating IntlCalendar content. Despite that ICU is behind this all, Intl has it's own interesting/undocumented behaviour.

heiglandreas,
@heiglandreas@phpc.social avatar

@SenseException 🤣 It has indeed 😁

heiglandreas,
@heiglandreas@phpc.social avatar

@SenseException Well.... Fixed itself over night.... 🙈

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