SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
Threaded View
-
Nov 8, 2001, 17:19 #1
- Join Date
- Jan 2001
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
JavaScript to Display Two Concurrent Time Zones
I have a free script working that I modified (nothing major -- I really just use them, not create them) to use in a HTML table cell such as-
Nov 8, 2001
4:45 PM
The original script was customized to display "Good Morning," "Good Afternoon," or "Good Evening." The "Good Morning" case is-
//Get the current hours
hourvalue = d.getHours();
//customize the greeting based on the current hours
if (hourValue < 12)
{
greeting = "Good Morning!"
timeText = hourValue + ":" + minuteValue + " AM"
}
...for 12, 17...
I would like to change
greeting = "Good Morning!" TO
greeting = "Hawaii"
and modify the parameters so that I have a 5-hour offset between my Baltimore EST clock and the Hawaii HST clock as the following example:
Baltimore
Nov 8, 2001
4:00 PM
Hawaii
Nov 8, 2001
11:00 AM
I would like to add EST and HST suffixes also.
Can anyone examine what I have here and make appropiate changes to display the two time zones shown just above. I can send more of the code I am using if required.
Thanks,
Ken Baker
Bookmarks