View Full Version : Counters without the time


Soul SLiver
11-08-2002, 05:34 PM
I'm 100% convinced that there's a code to do this without the time (which on my counter is not even close to the hour I have it set for) so I'm begging anyone with knowledge of HTML (and maybe even CGI) scripting to help!

Maybe I'm alone, but I don't want the time, I just want the days

I might add that I fiddled with the Escati one for a good 1/2 hour without figuring out the secret to ditching the time...I kept getting "invalid prompt" when I tried it on my computer...stupid computer language...Why can't it just speak dork? Then I would understand it! :D

toe
11-09-2002, 10:05 AM
Ummm...how bout something like this?


<SCRIPT Language="JavaScript">
<!-- hide from old browsers
var today = new Date()
var targetDate = new Date("11/09/2003") //use full year
var timeBeforeTarget = Math.floor(( targetDate.getTime()
- today.getTime()) / 86400000)
var msg = "<B>There are only " + (timeBeforeTarget +1)
+ " days until the year 2003.</B>"
document.write(msg)
//-->
</SCRIPT>


I just made it so the date was a year from today, cause I'm lazy and didn't wanna try and figure out all that math in your date eh. :D But you get the idea, just change whatever you want it to say at the bottom Soul, and put in your date at vartargetDate= new Date("yourdate").

Soul SLiver
11-09-2002, 10:18 AM
YOU RULE! I knew you'd come and rescue me! :)

Soul SLiver
11-09-2002, 10:21 AM
oooh....page no likey java script....and the counter disapeared...

toe
11-09-2002, 10:24 AM
HAHAHA....no likey.
Yeah, guess java's a no no.
Back to the drawing board.

Soul SLiver
11-09-2002, 10:26 AM
whatcha drawin for me next? :D

toe
11-09-2002, 10:58 AM
Ok, I know this is simple...but it's very easy to use and quite effective for the computer challenged. :D

2023days