|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-09-18 05:23 UTC] georg@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Feb 07 03:00:01 2026 UTC |
<?php print date('W', strtotime('20050101')); //prints '0' print date('W', strtotime('20023112')); //53 instead of 1 ?> ISO-8601 weeks always start on Mondays. The first week is the first week with 4 or more days in January. Don't know why the first example returns 0.. However it seems to me that date('W') just takes the first of January as the starting day for the week-count.