View Full Version : Javascript clock

05-25-2006, 08:58 PM
I've just spotted this forum and I am glad I did. I am in a desperate need of a clock program made in javascript. I need a clock that will show a time 12x faster (or 15x or whatever). What I mean is that if a set the clock starting date to January 1st 2000 and tommorrow I visit my website and its January the 2nd 2000 the clock will show JANUARY 13th 2000. Of course thats if we assume that both viewing times in Jan. 1st and 2nd were at noon (12 o'clock). So here is what I mean
12:15:00 1/1/2000 (today)
12:15:00 13/1/2000 (tommorow). Of course if only one hour passes it will show as if 12 hours passed. But please if anyone makes this script please mark the acceleration (12x, or whatever ration you use), bold it or whatever so I can edit it to suit my needs. And also don't make a clock that will show 12x the time now, I need a clock were I input a start date and then when I come back an hour later it'll show as if I was 12 hours away. If anyone could make this I would be most grateful. I tried to make it myself, but I end up with a time like 14:25:240, the seconds then go +12 until they reach 60 times 12 and of course I failed.

Thank you very much, even if you just read my post I am still thankfull

05-25-2006, 10:34 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


<script language="JavaScript" type="text/javascript">
var ToDay=new Date();
var Start=ToDay.getTime();

function AccelTime(by){
var now=new Date().getTime();
document.Show.Show1.value=new Date(((now-Start)*by)+Start).toUTCString();


<body onload="AccelTime(12);">
<form name=Show id=Show style="position:absolute;visibility:visible;top:450px;left:0px;" >
<input size=100 name=Show0 >
<input size=100 name=Show1 >


05-25-2006, 11:21 PM
Bless you! Thank you very very much!!!