| date The date object is used to return the date, the form of which is generated by its many constructor functions. Each instance of the date object is a value derived in milliseconds, and is relative to the zero hour point of January 1st, 1970. All positive values represent a date after January 1st, 1970. All negative values represent a date before January 1st, 1970. In generating new instance of the date object, you may use any of the many methods or arguments JavaScript has made available to you, a full list of which can be found below in the Date Methods and Date Arguments listings. When using arguments with the date object, follow the sequence of year, month, day, hours, minutes, seconds, and milliseconds. The browser stores the time as a millisecond value in the UTC method. UTC, also known simply as Universal Time, stands for Coordinated Universal Time, which is essentially Greenwich Mean Time taken from the January 1st, 1970 point. The time returned to the browser is taken from your operating system, so keep in mind that an incorrect system time may be causing any problems you may be encountering when working with the date object. syntax: var variableName = new date( ); var variableName = new date( milliseconds1 ); var variableName = new date( string ) var variableName = new date( year, month, day, hours, minutes, seconds, milliseconds2 ) EXAMPLE var currentDate = new Date(); document.write("The Current Date is: " + currentDate.getDate() ); This example merely creates a new date object called 'currentDate'. It is then used in a document.write statement to write the date to the screen. Utilizing the getDate() method the current date, taken from the operating system, is displayed. The Properties of the date Object are: • prototype The Arguments of the date Object are: • milliseconds1 • string • year • month • day • hours • minutes • seconds • milliseconds2 The Methods of the date Object are: • getDate() • getDay() • getFullYear() • getHours() • getMilliseconds() • getMinutes() • getMonth() • getSeconds() • getTime() • getTimezoneOffset() • getUTCDate() • getUTCDay() • getUTCFullYear() • getUTCHours() • getUTCMilliseconds() • getUTCMinutes() • getUTCMonth() • getUTCSeconds() • getYear() • parse() • setDate() • setFullYear() • setHours() • setMilliseconds() • setMinutes() • setMonths() • setSeconds() • setTime() • setUTCDate() • setUTCFullYear() • setUTCHours() • setUTCMilliseconds • setUTCMinutes() • setUTCMonth() • setUTCSeconds() • setYear() • toGMTString() • toLocaleString() • toString() • toUTCString() • UTC() • valueOf() |