1
rurbania
Help fix the date/time in this theme..
  • 2004/3/16 18:23

  • rurbania

  • Just popping in

  • Posts: 15

  • Since: 2004/2/17


This theme is in all English except for the Box on the top right, which I believe is displaying the time. Any idea how to fix it?

http://www.progressivepatterns.com

2
fatman
Re: Help fix the date/time in this theme..
  • 2004/3/16 18:48

  • fatman

  • Friend of XOOPS

  • Posts: 176

  • Since: 2003/12/13


Hi. Can you provide us a link

cheers.

3
Dave_L
Re: Help fix the date/time in this theme..
  • 2004/3/16 22:22

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


You mean that animated clock? It looks like this Javascript is doing that:

<Script Language="JavaScript">

Script>

4
tjnemez
Re: Help fix the date/time in this theme..
  • 2004/3/17 3:26

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


hey dave_l,

here is a sample script:

var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")

function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate=""+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" - "+hours+":"+minutes+":"+seconds+" "+dn
+"
"
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}
window.onload=goforit

edit the following if you want to remove seconds etc:

"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" - "+hours+":"+minutes+":"+seconds+" "+dn
+"
"

Login

Who's Online

451 user(s) are online (169 user(s) are browsing Support Forums)


Members: 0


Guests: 451


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits