News for hackers. Stuff that matters.
Re:ISO-8601, YYYY, yyyy, and why your year may be wrong by Moru on Wednesday December 26, 2018 @06:13PM (#18765695)
People complain a lot about PHP but it's not always horrible. Excerpt from the documentation:

o - ISO-8601 week-numbering year. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. (added in PHP 5.1.0)

(https://secure.php.net/manual/en/function.date.php)

We had this problem a long time ago when asp was used. We really needed this Year-week numbering but it didn't work. It was hard-coded to 52 weeks per year and the year was the true year. Someone had to manually fix it every few years when it didn't add up.

There are no comments on this comment yet.