next up previous contents
Next: Methods Up: FFish Script Objects Reference Previous: unshift   Contents


Date Object

Description

Enables basic storage and retrieval of dates and times.


Syntax

  1. new Date()
  2. new Date(value)
  3. new Date(year, month, date[, hours[, minutes[, seconds[,ms]]]])


Parameters

value
If a numeric value, value represents the number of milliseconds in Universal Coordinated Time between the specified date and midnight January 1, 1970. If a string, value is parsed according to the rules in the parse method.
year
The full year, all digits of the year must be specified.e.g.1982 and 82 refers to the different year.
month
The month as an integer between 0 (January) and 11 (December).
date
The date as an integer between 1 and 31.
hours
An integer from 0 (midnight) to 23 (11pm) that specifies the hour.
minutes
An integer from 0 to 59 that specifies the minutes.
seconds
An integer from 0 to 59 that specifies the seconds.
ms
An integer from 0 to 999 that specifies the milliseconds.


Remarks

A Date object contains a float value representing the numbers of millisecond intervals since Jan 1, 1970. If a date object is contracted without parameters, it represents the current time. The range of dates that can be represented in a Date object is approximately 285,616 years on either side of Jan 1, 1970. If you have specified a value exceed the range, the date is set to Jan 1, 1970. The Date object has two static methods that are called without creating a Date object. They are parse and UTC.




Subsections
next up previous contents
Next: Methods Up: FFish Script Objects Reference Previous: unshift   Contents
Copyright ©2000-2007 Shanghai TopCMM Software Technologies. All Rights Reserved.