note 76922 added to function.date
| From: | erik dot mellstrom at gmail dot com | Date: | Mon, 06 Aug 2007 01:02:38 +0000 |
| Subject: | note 76922 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129196@lists.php.net to get a copy of this message | ||
Jared E, I believe you are making things too complicated here.
Just skip date() and strtotime() and you will have the same result as long as the zeros are still
zeros (and if not, just add round($x)).
<?php
$now = mktime(0,0,0,date("m"),date("d"),date("Y"));
$then = mktime(0,0,0,date("m")+1,date("d"),date("Y"));
$x = (($then - $now) / 1440)/60;
?>
----
Server IP: 129.16.214.50
Probable Submitter: 212.214.155.153
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/76922
Del: integrated -- https://master.php.net/note/delete/76922/integrated
Del: useless -- https://master.php.net/note/delete/76922/useless
Del: bad code -- https://master.php.net/note/delete/76922/bad+code
Del: spam -- https://master.php.net/note/delete/76922/spam
Del: non-english -- https://master.php.net/note/delete/76922/non-english
Del: in docs -- https://master.php.net/note/delete/76922/in+docs
Del: other reasons-- https://master.php.net/note/delete/76922
Reject -- https://master.php.net/note/reject/76922
Search -- https://master.php.net/manage/user-notes.php