Countdown clock!

PlayingMantis

Newbie
Joined
Jul 2, 2004
Messages
122
Reaction score
0
Now that we are at it, someone please create a countdown (clock) to that date, in Seattle!

29 days 3 hours and so many seconds to go or something...
 
HL2CD.php


That work for you?

Edit:BTW In case you didn't notice, this does change automatically, just Refresh. And it is using the same timezone as VALVe.
 
this site needs its own counter :p
come on staff.. we need a counter!!! :thumbs:
 
PlayingMantis said:
Almost. ;)

REAL TIME clock would be nice...

...also, Valve HQ time please (Seattle?).

I didn't make an auto-refreshing one. I wouldn't be able to post it on forums if I did. It will be up to Halflife2.net's staff to embed a Javascript clock if they want. And this is using PST, same as VALVe does at their HQ in Bellevue, WA.
 
can I post that clock image on my site please? I'm asking for permission first. =)
 
PlayingMantis said:
Now that we are at it, someone please create a countdown (clock) to that date, in Seattle!

29 days 3 hours and so many seconds to go or something...

damn, i was going to post something similar. this is a great idea, a place i can make my homepage... :)
 
Ateoto said:
I didn't make an auto-refreshing one. I wouldn't be able to post it on forums if I did. It will be up to Halflife2.net's staff to embed a Javascript clock if they want. And this is using PST, same as VALVe does at their HQ in Bellevue, WA.

Great. Thanks.
 
haloevo said:
can I post that clock image on my site please? I'm asking for permission first. =)

Go for it. It was created for me to use as a Sig Image on forums, Anyone can use it if they want to.
 
For those who wanted a Refreshing Javascript Countown

http://mattmccants.net/HL2CD.php

Source Code:

Put this in <head>

Code:
<script language="JavaScript1.2">

/*
Dynamic countdown Script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS,
visit http://www.dynamicdrive.com
*/


function setcountdown(theyear,themonth,theday){
yr=theyear;mo=themonth;da=theday
}

//////////CONFIGURE THE COUNTDOWN SCRIPT HERE//////////////////

//STEP 1: Configure the countdown-to date, in the format year, month, day:
setcountdown(2004,11,16)

//STEP 2: Change the two text below to reflect the occasion, and message to display on that occasion, respectively
var occasion="HalfLife2"
var message_on_occasion="Merry Christmas!"

//STEP 3: Configure the below 5 variables to set the width, height, background color, and text style of the countdown area
var countdownwidth='480px'
var countdownheight='20px'
var countdownbgcolor='white'
var opentags='<font ><small>'
var closetags='</small></font>'

//////////DO NOT EDIT PASS THIS LINE//////////////////

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
var crosscount=''

function start_countdown(){
if (document.layers)
document.countdownnsmain.visibility="show"
else if (document.all||document.getElementById)
crosscount=document.getElementById&&!document.all?document.getElementById("countdownie") : countdownie
countdown()
}

if (document.all||document.getElementById)
document.write('<span id="countdownie" ></span>')

window.onload=start_countdown


function countdown(){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todayh=today.getHours()
var todaymin=today.getMinutes()
var todaysec=today.getSeconds()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
futurestring=montharray[mo-1]+" "+da+", "+yr
dd=Date.parse(futurestring)-Date.parse(todaystring)
dday=Math.floor(dd/(60*60*1000*24)*1)
dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
//if on day of occasion
if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1&&todayd==da){
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+message_on_occasion+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+message_on_occasion+closetags
return
}
//if passed day of occasion
else if (dday<=-1){
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+"Occasion already passed! "+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+"Occasion already passed! "+closetags
return
}
//else, if not yet
else{
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+occasion+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+occasion+closetags
}
setTimeout("countdown()",1000)
}
</script>

Then Put this where you want the counter.
Code:
<ilayer id="countdownnsmain" width=&{countdownwidth}; height=&{countdownheight}; bgColor=&{countdownbgcolor}; visibility=hide><layer id="countdownnssub" width=&{countdownwidth}; height=&{countdownheight}; left=0 top=0></layer></ilayer>

You will have to adjust this for your timezone. If you need help, send me a IM.
 
here is soemthing I made quickly in HTML... no big deal but is always updated (no need for refresh)

Eastern Time

Central Time

Mountain Time

Pacific Time

yea I know these are just for America or who ever is in these time zones (sorry for everyone else) but if you would like one for your time Zone just say so and/or send me a PM with what time zone you are in! Hope you guys like it!

Also if someone can give me a place that will be dedicated (I'm not sure if this will be able to host it for long.. it should though) then contact me! Thanks guys!!!

EDIT: Woops.. someone beat me to it :( o well... here are the links anywayz if anyone wants it
 
Yours are better, because they don't have to edit them for their Timezone. Nice work :cheers:
 
soccerdude21490 said:
here is soemthing I made quickly in HTML... no big deal but is always updated (no need for refresh)

Eastern Time

Central Time

Mountain Time

Pacific Time

yea I know these are just for America or who ever is in these time zones (sorry for everyone else) but if you would like one for your time Zone just say so and/or send me a PM with what time zone you are in! Hope you guys like it!

Also if someone can give me a place that will be dedicated (I'm not sure if this will be able to host it for long.. it should though) then contact me! Thanks guys!!!

EDIT: Woops.. someone beat me to it :( o well... here are the links anywayz if anyone wants it

Thank you too.
 
Im afraid thats the best I can do and still make it an image. It refreshes whenever the page is refreshed. Now it could be done easily for forums that let you use flash sigs.
 
Back
Top