To some people it may be news that their computer has a timing system,
and that it is written in JavaScript,

but if you think about it for a little while it makes sense to have the timing co-ordinated and subservient to a dominant system which makes everything run smoothly and in order.
As with a joke, if the timing is off, the whole thing can go haywire, but this is not a joke.
Index
          Operating systems
          
BitCom
          
Browsers
          
Timing System page 2
A brief introduction
The timing system is located both within the Operating system and within the Browser code, that is, the physical software resides in both, and calls to the Timing System (T/S) such as the ones shown later on this page need both the browswer and the O/S software to work properly.  When you start your computer, this software is loaded into memory from your HDD (Hard Disk Drive). It is shareware and belongs to Baker Publishing, not Microsoft, NEC, Netscape or Sun although Sun does claim the rights to JavaScript..
It not only returns a date, month or hour (see later in this page), but is preprogrammed to correct your computer's clock for the correct daylight saving time for your time zone, country and year, and perform several other functions such as memory management.
The Millennium bug
Some of you may remember the problems computer people thought they would have with the millennium, when they realized the PC could not handle the reversion to the year 00 using a two digit year code, and may reset itself to the year 1900, or even the year 0000. As it turned out, there was a simple solution; use JavaScript, as explained here:
http://www.javascriptkit.com/javatutors/y2kdate.shtml
http://www.javascriptkit.com/javatutors/datedifference.shtml
The solution
*
Done with the problem, now onto the solution. To have JavaScript
accurately write out the correct year starting in Y2K, simply
conditionally add 1900 to Date.getYear(). The condition to test
for is whether the year is less than 1000. So, with that in mind,
here's the fixed code:
*
var year=mydate.getYear()
//Y2K bug fix
if (year < 1000)
year+=1900
*
Variable "year" will now always contain the correct 4 digit year,
regardless of which browser runs it.
*
Check the source of some of our Date scripts, and you'll notice
the above snippet in most of them. Now you know why they're
there, and how to go about fixing your OWN Y2K incompatible
scripts!
*

http://javascriptkit.com/jsref/date.shtml
Date Object

Last updated: July 30th, 2004
*
There are fours ways of instantiating a date object:
*
new Date()
new Date(milliseconds)
new Date(dateString)
new Date(year, month, day, hours, minutes, seconds, milliseconds) //most parameters here are optional. Not specifying causes 0 to be passed in.
*
Here are a few examples of instantiating a date:
today = new Date()
birthday = new Date("March 11, 1985 09:25:00")
birthday = new Date(85,2,11)
birthday = new Date(85,2,11,9,25,0
Other bugs
There is a self correcting programme which comes with JavaScript, when you download your JavaScript capable browser, which detacts spelling context and syntax errors and attempts to correct them. Many of you will have seen the sign, "JavaScript Error" when using Internet Explorer 4.This program is free but is time stamped so that at some point if your software remains unlicensed, it may stop working for a period.
Hosted by www.Geocities.ws

1