Re: Date difference
| From: | jeremy brand | Date: | Mon, 08 Jan 2001 21:46:07 +0000 |
| Subject: | Re: Date difference | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33326@lists.php.net to get a copy of this message | ||
$today = time();
$future_time = mktime($hour, $minute, $second, $month, $day, $year);
$diff = $future_time - $today;
/* $diff is in seconds, so you could divide by 60*60 * 24 to get days
*/
$days = $diff / (60*60*24);
On Mon, 8 Jan 2001, Liam Gibbs wrote:
> Date: Mon, 8 Jan 2001 16:35:09 -0500
> From: Liam Gibbs <lgibbs@microlegend.com>
> To: php-general@lists.php.net
> Subject: [PHP] Date difference
>
> Does anyone know how to figure out the amount of days between today and a
> future date?
>
> Liam Gibbs
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>