note 38592 deleted from function.date by kennyt

From: Date: Sun, 18 Jul 2004 17:28:32 +0000
Subject: note 38592 deleted from function.date by kennyt
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73514@lists.php.net to get a copy of this message
Note Submitter: chris-php@bolt.cx ---- If you are using the W format character (ISO-8601 week number of year) and the Y format character, the week may loop back to 1 in late December: <? $endofyear = mktime(0, 0, 0, 12, 30, 2003); echo(date("Y-W\n", $endofyear)); ?> will return 2003-1. If you want the correct year (correct for ISO-8601's week number), use strftime's %G and %V specifiers: <? $endofyear = mktime(0, 0, 0, 12, 30, 2003); echo(strftime("%G-%V\n", $endofyear)); ?> will return 2004-01.

« previous php.notes (#73514) next »