|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[1999-09-14 21:59 UTC] gib at galileo dot jpte dot hu
<?php
$doy = intval(date("z",mktime(0,0,0,9,14,1999)));
$dos = intval(date("d",mktime(0,0,0,1,$doy,1999)));
echo "1999 september 14 is not equal to 1999 september ".$dos."<br>;
?>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 17 19:00:02 2025 UTC |
date("z",...) returns day of year zero-based. but day-of-month passed to mktime() is one-based. that's the thing, that makes it differ by one day.