note 52286 deleted from function.date by aidan

From: Date: Sun, 31 Jul 2005 12:35:28 +0000
Subject: note 52286 deleted from function.date by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-92825@lists.php.net to get a copy of this message
Note Submitter: jonathan at jkdwebmagic dot com ---- Another version of the countdown: // Event Date: 29 December 2005 - 14:35 $eventDateStamp = mktime(14, 35, 0, 12, 29, 2005); if ($eventDateStamp > time()) { $secondsLeft = $eventDateStamp - time(); $days = intval($secondsLeft / 86400); // 86400 seconds in a day $partDay = $secondsLeft - ($days * 86400); $hours = intval($partDay / 3600); // 3600 seconds in an hour $partHour = $partDay - ($hours * 3600); $minutes = intval($partHour / 60); // 60 seconds in a minute $seconds = $partHour - ($minutes * 60); $timeLeft = $days." days ".$hours." hours ".$minutes." minutes ".$seconds." seconds until event!!!"; } else { $timeLeft = 'Event has come!!!'; } echo $timeLeft;

« previous php.notes (#92825) next »