note 95460 deleted from function.date by danbrown
| From: | danbrown@php.net | Date: | Mon, 04 Jan 2010 16:00:49 +0000 |
| Subject: | note 95460 deleted from function.date by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-164609@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
Although it is described in the documentation it took me some time to note that instead of:
<?php
date('Y-W');
?>
You'd better use:
<?php
date('o-W');
?>
to get the year and ISO-8601 weeknumber, since "o" automagically calculates the correct
year if the ISO week number (W) belongs to the previous or next year.