note 15926 deleted from ref.datetime by victor

From: Date: Mon, 09 Dec 2002 18:52:05 +0000
Subject: note 15926 deleted from ref.datetime by victor
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-40613@lists.php.net to get a copy of this message
Simple way to calculate the days until something (looks like one of the entries above suggest multiplying instead of dividing!). This'll return a nice number formatted to two (2) decimal places. $today = time(); $daysuntil = ((($timestamp - $today) / 60) / 60) / 24; $daysuntil = number_format($daysuntil,2);

« previous php.notes (#40613) next »