Date and time (Definition)

There is a variety of ways to work with dates and times.

Date and time values are manipulated by means of a Date object. You can instantiate a new copy of the built-in Date object with its constructor. The new instance will hold a fixed time value, which might be 'the time now' or may have been initialized with some other value.

You can get and set various components of the time and date values for a Date object. Note that, although you can use the set methods to set a Date object to the system time, this will not alter the system time of the machine you are running the script in.

It is possible that some implementations may provide that capability, but it is not defined as part of the standard.

See also:Broken down time, Calendar time, Daylight savings time adjustment, Local time, Localization, Universal coordinated time