• The development of any software program, including, but not limited to, training a machine learning or artificial intelligence (AI) system, is prohibited using the contents and materials on this website.

the count down has begun

HBOMB

New Member
Joined
Mar 21, 2005
Messages
6
Location
melbourne australia
i love the count down i was thinking my self how good wil it be to have an count down and it's there already good work :thumbsup:
 
Yeah, I have it in my sig too... :D
 
there's one thing wrong with it

" Only about 2 weeks, 1 days, 10 hours, 0 minutes, and 50 seconds until the new Top Gear season starts on May 22nd!"

or you say

Only about 2 weeks and 1 day until the new Top Gear season starts on May 22nd!

or you say

Only 2 weeks, 1 days, 10 hours, 0 minutes, and 50 seconds until the new Top Gear season starts on May 22nd!

you shouldn't use about if you're so precise

lame comment :oops:
 
Maybe he did the ABOUT thing because it doesn't refresh and if you look at it it's already not accurate anymore..
 
Renesis said:
sucks Viper puts seconds/minutes in it but no autorefresh... :roll:
I don't want the page to auto-refresh (what if someone leaves their browser on?) and I don't know / care enough to code up some Javascript to display it live.
 
bone said:
there's one thing wrong with it

" Only about 2 weeks, 1 days, 10 hours, 0 minutes, and 50 seconds until the new Top Gear season starts on May 22nd!"

or you say

Only about 2 weeks and 1 day until the new Top Gear season starts on May 22nd!

or you say

Only 2 weeks, 1 days, 10 hours, 0 minutes, and 50 seconds until the new Top Gear season starts on May 22nd!

you shouldn't use about if you're so precise

lame comment :oops:
I just threw it together quickly. :p

Code:
<?php

$secsuntiltg = mktime(20, 0, 0, 5, 22, 2005) - 28800 - (time() + $timeoffsetsec);

if ($secsuntiltg > 0) {
	$weeks = floor($secsuntiltg / 604800);
	$days = floor(($secsuntiltg - ($weeks * 604800)) / 86400);
	$hours = floor(($secsuntiltg - ($weeks * 604800) - ($days * 86400)) / 3600);
	$minutes = floor(($secsuntiltg - ($weeks * 604800) - ($days * 86400) - ($hours * 3600)) / 60);
	$seconds = floor($secsuntiltg - ($weeks * 604800) - ($days * 86400) - ($hours * 3600) - ($minutes * 60));

	echo "Only about $weeks weeks, $days days, $hours hours, $minutes minutes, and $seconds seconds until the new Top Gear season starts on May 22nd!";
} elseif ($secsuntiltg > -3600) {
	echo "The new Top Gear episode is currently airing in the UK!";
} else {
	echo "The new Top Gear episode has already aired and should be out soon (if it isn't already)!";
}

?>
Although if you really want, I can write a bunch of if's to handle the number one (minute instead of minutes, etc.) and to no display it if it's 0.

Just a lotta work for something that doesn't really matter IMO and that will only be there for 2 more weeks.

As for the about - it's very precise code wise, but the server's clock isn't so precise, hence the about. Plus, I think it looks cooler with seconds. :)
 
Viper007Bond said:
Renesis said:
sucks Viper puts seconds/minutes in it but no autorefresh... :roll:
I don't want the page to auto-refresh (what if someone leaves their browser on?) and I don't know / care enough to code up some Javascript to display it live.

yeah not a page refresh but just a script refresh would be nice
 
Top