note 76889 deleted from function.date by bobby
| From: | bobby@php.net | Date: | Mon, 06 Aug 2007 14:35:43 +0000 |
| Subject: | note 76889 deleted from function.date by bobby | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-129214@lists.php.net to get a copy of this message | ||
Note Submitter: Jared E.
----
Find an integer time difference between now and a future date:
This is not rocket science, but it might save someone a bit of time:
<?php
$now =
date("m/d/y",mktime(0,0,0,date("m"),date("d"),date("Y")));
$then =
date("m/d/y",mktime(0,0,0,date("m")+1,date("d"),date("Y")));
$x = ((strtotime($then) - strtotime($now)) / 1440)/60;
?>