|
Simple Daylight Savings Time
JavaScript |
|
I looked around for a script that would return whether is was daylight savings time or not. All I wanted to do was determine whether to write CST or CDT (Central Daylight Time) after printing the time on a page. Nothing fancy needed. All I found was a lot of long complicated or crappy scripts, some of which didn't work. So I wrote one. Now this is for USA time and aside from the obvious time zone anomalies associated with client-time JavaScript this little function will do the job. Close enuf fer guvment wurk! Oh and feel free to modify it for other times and places since the guvment seems to like to change the change every now and then. Place the script in the head of your page and call it from anywhere. It returns true if DST is in effect. At the moment you loaded this page the script returned a value of . |
|
|
|
Were you looking for JavaScript code to get the time and date
from your server? Look Here. Were you looking for a cool typing news ticker that does html? Look Here. |
| If you find this code of value, donate a little to the cause. Think of the time you just saved! |
| USE AT YOUR OWN RISK! |
|
Questions / Comments? Email me. |
|
|