3 ms·
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, e
by Moru 8y ago
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 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.