If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Time Of Day/week/hour Message Help

Hi i have been looking everywhere and cant seem time to find anything matching,
what i need is a scheduled message on a website, basically stating days of the week and time and who is live on air. also people maybe on air at 17.30 so i have no idea on how to code this.

To update every minute wrap the whole thing in a function named display(),
then:-
<body onload = "display()">
and at the end of the function:-
setTimeout("display()", 60000); // every 60 seconds
}
</script>

You can use any simple clock script to display the date and time.

At least once per year, some group of scientists will become very excited and announce that whatever they announced last year about global warming is wrong.

Could you possibly write a full script (like your initial script above) that includes all the changes needed to include minutes. I am trying to make these changes to the script on my website and I am getting all kinds of different results that are not adding up to me. My time zone is -7 Mountain Time also.

Is the
var mn = now.getMinutes();

the only thing you have to add to the top under the hour line or do you have to do something to this line:

Of course lol it was that simple. I was trying to make big thing out of it and change other portions of the script. That's really cool! Works perfect! Thank you so much for setting that straight for me!

A lot of other websites have "time of day" scripts but they all just display a message like, Good Morning, Good Afternoon, Good Evening, and Good Night. Plus they don't include the time offset and minutes so they really suck. This script is a lot more elaborate and like Leemills up there, you are helping me understand this stuff too! Thanks again!

I have been using this script for a short while now and it was working ok until the time got to midnight, I then learned that you must use 0 instead of 24 to represent the 12am hour. After I got past that short dilemma, now the script works fine until 11pm and will not display the proper information for the 11pm hour. I thought changing the midnight number from 24 to 0 might have messed with it so I changed it back a forth a few times and still no fix. Is there anything I can do to fix this? I wonder if it has anything to do with an error in internet time or something?