|
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-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 17:00:01 2025 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.