note 87707 added to function.mktime

From: Date: Wed, 17 Dec 2008 19:30:03 +0000
Subject: note 87707 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-148276@lists.php.net to get a copy of this message
Days until Christmas: <?php $time = mktime(0, 0, 0, 12, 25, 2008, 1) - time(); $days = floor($time/86400); $hours = floor(($time-($days*86400))/3600); $mins = floor (($time-($days*86400)-($hours*3600))/60); $secs = floor ($time-($days*86400)-($hours*3600)-($mins*60)); $tsecs = $time; $thours = round($time/3600); if ($tsecs <= 600) { echo '<html> <head> <title> ' . $tsecs . ' seconds left until 12am Christmas Day </title> <meta http-equiv="refresh" content="1;url=""></head> <body><span style="font-size:10pt">Christmas day in ' . $days . ' days ' . $hours . ' hours ' . $mins . ' mins ' . $secs . ' seconds!<br><br>(There are ' . $tsecs . ' seconds in total)</span></body></html>'; } else { echo '<html> <head> <title> ' . $thours . ' hours left until 12am Christmas Day </title> <meta http-equiv="refresh" content="10;url=""></head> <body><span style="font-size:10pt">Christmas day in ' . $days . ' days ' . $hours . ' hours ' . $mins . ' mins ' . $secs . ' seconds!<br><br>(There are ' . number_format($thours) . ' hours in total and ' . number_format($tsecs) . ' seconds in total)</span></body></html>'; } ?> ---- Server IP: 92.48.74.199 Probable Submitter: 91.104.94.188 ---- Manual Page -- http://www.php.net/manual/en/function.mktime.php Edit -- https://master.php.net/note/edit/87707 Del: integrated -- https://master.php.net/note/delete/87707/integrated Del: useless -- https://master.php.net/note/delete/87707/useless Del: bad code -- https://master.php.net/note/delete/87707/bad+code Del: spam -- https://master.php.net/note/delete/87707/spam Del: non-english -- https://master.php.net/note/delete/87707/non-english Del: in docs -- https://master.php.net/note/delete/87707/in+docs Del: other reasons-- https://master.php.net/note/delete/87707 Reject -- https://master.php.net/note/reject/87707 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#148276) next »