n/oldblog
Archived
1
0
Fork 0
This repository has been archived on 2024-02-13. You can view files and clone it, but cannot push or open issues or pull requests.
oldblog/pages/40days.php
2023-04-30 21:50:11 +02:00

23 lines
804 B
PHP

<? /*
declare target date; source: http://us.imdb.com/ReleaseDates?0121766 ;
*/
$day = 17; // Day of the countdown
$month = 11; // Month of the countdown
$year = 2006; // Year of the countdown
$hour = 23; // Hour of the day (east coast time)
$event = "End"; //event
$calculation = ((mktime ($hour,0,0,$month,$day,$year) - time(void))/3600);
$hours = (int)$calculation;
$days = (int)($hours/24);
/*
mktime() http://www.php.net/manual/en/function.mktime.php
time() http://www.php.net/manual/en/function.time.php
(int) http://www.php.net/manual/en/language.types.integer.php
*/
?>
<ul>
<li>The date is <?=(date ("l dS of F Y h:i:s A"));?>.</li>
<li>It is <?=$days?> days until <?=$event?>.</li>
<li>It is <?=$hours?> hours until <?=$event?>.</li>
</ul>