note 70725 added to function.mktime
| From: | morten at jakofeld dot dk | Date: | Wed, 25 Oct 2006 13:52:19 +0000 |
| Subject: | note 70725 added to function.mktime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119099@lists.php.net to get a copy of this message | ||
How many days in october???
I have tried calculating the number of days between to give dates but sometimes I get an odd number.
So I tried calculating some simple ones and still had the error.
My question is really not how many days there are in october ;)
But how do I convince PHP about my opinion on that matter....
try this one:
$october_start = mktime(00,00,00,10,1,2006);
$october_end = mktime(23,59,59,10,31,2006);
$october_seconds = $october_end - $october_start;
$october_days = $october_seconds/(24*60*60);
echo $october_days;
----
Server IP: 195.184.96.15
Probable Submitter: 83.92.121.173
----
Manual Page -- http://www.php.net/manual/en/function.mktime.php
Edit -- https://master.php.net/note/edit/70725
Del: integrated -- https://master.php.net/note/delete/70725/integrated
Del: useless -- https://master.php.net/note/delete/70725/useless
Del: bad code -- https://master.php.net/note/delete/70725/bad+code
Del: spam -- https://master.php.net/note/delete/70725/spam
Del: non-english -- https://master.php.net/note/delete/70725/non-english
Del: in docs -- https://master.php.net/note/delete/70725/in+docs
Del: other reasons-- https://master.php.net/note/delete/70725
Reject -- https://master.php.net/note/reject/70725
Search -- https://master.php.net/manage/user-notes.php