layer8.space is one of the many independent Mastodon servers you can use to participate in the fediverse.
Welcome to the 8th Layer of Madness Most topics are related to Linux, Anime, Music, Software and maaaany more PS: BSD is also welcome 😜

Administered by:

Server stats:

310
active users

#php funny quirks. We just stumbled upon a problem in production where we were sharding datas using Year and Week syntax.

The code was something like $Suffix = $now->format("YW"). Well, turns out 2024-12-31 returns 202401 as Suffix because Year is 2024 and week would be 53.

Long story short, format has a macro macro "o" that returns ISO8601 year, so $now->format('oW') returns 202501 correctly for last days of the year.

That's one of those corner case you'd never take in consideration.

@necrophcodr Yep, seems the "An year always have 52 weeks" is just on spot. Frankly speaking I'd expected 202453.