note 85939 added to function.date

From: Date: Thu, 25 Sep 2008 15:48:52 +0000
Subject: note 85939 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-144703@lists.php.net to get a copy of this message
RE: wulf dot kaiser at mpimf-heidelberg dot mpg dot de code to work out fridays in a month. I noticed one small error. It looks like the <?php if ($givenMonth != '12') { $nextGivenMonth = "1"; $nextGivenYear = $givenYear + 1;} ?> block was setting every month to 1 because it was not equal to 12. I changed that to <?php if ($givenMonth == '12') { ?>and now all is fine! Now - to refine it so that it only shows Fridays on the 5th or after, until the 4th of the next month.. Damm UK tax stuff! =) N ---- Server IP: 64.71.164.2 Probable Submitter: 86.165.73.45 ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- https://master.php.net/note/edit/85939 Del: integrated -- https://master.php.net/note/delete/85939/integrated Del: useless -- https://master.php.net/note/delete/85939/useless Del: bad code -- https://master.php.net/note/delete/85939/bad+code Del: spam -- https://master.php.net/note/delete/85939/spam Del: non-english -- https://master.php.net/note/delete/85939/non-english Del: in docs -- https://master.php.net/note/delete/85939/in+docs Del: other reasons-- https://master.php.net/note/delete/85939 Reject -- https://master.php.net/note/reject/85939 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#144703) next »