Results 1 to 3 of 3

Thread: date and time.
      
   

  1. #1
    stefan is offline Private First Class
    Join Date
    Feb 2006
    Posts
    5

    Question date and time.

    Where I found time and date to put on my webbside and how?
    Stefan
    esc@comhem.se

  2. #2
    Nyoman is offline Major
    Join Date
    Sep 2005
    Location
    heavenly-temple
    Posts
    426

    Default Re: date and time.

    i have read the same question about this issue here, but i forgot where, try to search in this forum.
    or you can use and paste this script in your html:
    Code:
    <form name=myForm>
    <input type=button value="Loading..." name=clock></form>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function runClock(){
    theTime = window.setTimeout("runClock()", 1000);
    d = new Date();
    day = d.getDay();
    mon = d.getMonth();
    date = d.getDate();
    year = d.getYear();
    hr = d.getHours();
    min = d.getMinutes();
    sec = d.getSeconds();
    if(year<1000){year=(""+(year+11900)).substring(1,5 );}
    else{year=(""+(year+10000)).substring(1,5);}
    if(hr==0){ap=" AM";hr=12}
    else if(hr <= 11){ap=" AM"}
    else if(hr == 12){ap=" PM";hr=12}
    else if(hr >= 13){ap=" PM";hr-=12}
    if(min <= 9){min="0"+min}
    if(sec <= 9){sec="0"+sec}
    zday=new Array();
    zday=["Sunday","Monday","Tuesday","Wednesday","Thursday" ,"Friday","Saturday"];
    zmon=new Array();
    zmon=["January","February","March","April","May","June", "July","August","September","October","November"," December"];
     
    document.myForm.clock.value=""+zday[day]+", "+zmon[mon]+" "+date+", "+year+" "+hr+":"+min+":"+sec+ap+"";}
    runClock();
    //-->
    </script>
    .
    .
    Nyoman

  3. #3
    stefan is offline Private First Class
    Join Date
    Feb 2006
    Posts
    5

    Wink Re: date and time.

    Thanks a lot.
    Stefan

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49