Core JavaScriptExtendScript only
Object

Date

A date/time object.

Methods

Date

Returns a new Date object holding the current date and time.

year Number The year expressed in four digits.
month? Number 0–11 An integer value from 0 (Jan) to 11 (Dec).
day? Number 1–31 An integer value from 1 to 31, If this argument is not supplied, its value is set to 0.
hours? Number 0–23 An integer value from 0 (midnight) to 23 (11 PM). If this argument is not supplied, its value is set to 0.
min? Number 0–59 An integer value from 0 to 59. If this argument is not supplied, its value is set to 0.
sec? Number 0–59 An Integer value from 0 to 59. If this argument is not supplied, its value is set to 0.
ms? Number 0–999 An integer value from 0 to 999. If this argument is not supplied, its value is set to 0.
Date

Returns the number of milliseconds between midnight January 1, 1970, UTC, and the specified time.

year Number The year expressed in four digits, for example, 2001.
month? Number 0–11 An integer value from 0 (Jan) to 11 (Dec).
day? Number 1–31 An integer value from 1 to 31, If this argument is not supplied, its value is set to 0.
hours? Number 0–23 An integer value from 0 (midnight) to 23 (11 PM). If this argument is not supplied, its value is set to 0.
min? Number 0–59 An integer value from 0 to 59. If this argument is not supplied, its value is set to 0.
sec? Number 0–59 An Integer value from 0 to 59. If this argument is not supplied, its value is set to 0.
ms? Number 0–999 An integer value from 0 to 999. If this argument is not supplied, its value is set to 0.
Number

Returns the day of the month of the specified Date object in local time.

Number

Returns the day of the week for the specified Date object in local time.

Number

Returns the four digit year of the specified Date object in local time.

Number

Returns the hour of the specified Date object in local time.

Number

Returns the milliseconds of the specified Date object in local time.

Number

Returns the minutes of the specified Date object in local time.

Number

Returns the month of the specified Date object in local time.

Number

Returns the seconds of the specified Date object in local time.

Number

Returns the number of milliseconds since midnight January 1,1970 UTC for the specified Date object.

Number

Returns the difference in minutes between the computer's local time and UTC.

Number

Returns the day of the month of the specified Date object according to UTC.

Number

Returns the day of the week for the specified Date object according to UTC.

Number

Returns the four digit year of the specified Date object according to UTC.

Number

Returns the hour of the specified Date object according to UTC.

Number

Returns the milliseconds of the specified Date object according to UTC.

Number

Returns the minutes of the specified Date object according to UTC.

Number

Returns the month of the specified Date object according to UTC.

Number

Returns the seconds of the specified Date object according to UTC.

Number

Returns the year of the specified Date object, as a difference from 1900, in local time.

Date

Parses a string, returning a new Date object. The string should be similar to the string returned bt toString().

text String The string to parse.
Number

Sets the day of the month of a specified Date object according to local time.

date Number 1–31 An integer from 1 to 31 indicating the day of the month.
Number

Sets the year of a specified Date object according to local time.

year Number A four-digit integer value indicating the year to set.
Number

Sets the hours of a specified Date object according to local time.

hour Number 0–23 An integer value from 0 (midnight) to 23 (11 PM).
Number

Sets the milliseconds of a specified Date object according to local time.

ms Number 0–999 An integer value from 0 to 999.
Number

Sets the minutes of a specified Date object according to local time.

minutes Number 0–59 An integer value from 0 to 59.
Number

Sets the month of a specified Date object according to local time.

month Number 0–11 An integer value from 0 (Jan) to 11 (Dec).
Number

Sets the seconds of a specified Date object according to local time.

seconds Number 0–59 An integer value from 0 to 59.
Number

Sets the date of a specified Date object in milliseconds since midnight, January 1, 1970.

ms Number An integer indicating the number of milliseconds between the date set and midnight, January 1, 1970.
Number

Sets the date of a specified Date object according to universal time.

date Number 1–31 An integer from 1 to 31 indicating the day of the month.
Number

Sets the year of a specified Date object according to UTC, can also set the month and date.

year Number The year expressed in four digits.
Number

Sets the hours of a specified Date object according to UTC.

hours Number 0–23 An integer value from 0 (midnight) to 23 (11 PM) indicating the hour to be set.
Number

Sets the milliseconds of a specified Date object according to UTC.

ms Number 0–999 An integer value in the range of 0 to 999 indicating the number of milliseconds to set.
Number

Sets the minutes of a specified Date object according to UTC.

min Number 0–59 An integer value in the range 0 to 59 indicating the number of minutes to be set.
Number

Sets the month of a specified Date object according to UTC.

month Number 0–11 An integer value in the range 0 (Jan.) to 11 (Dec.) indicating the month to set.
Number

Sets the seconds of a specified Date object according to UTC.

sec Number 0–59 An integer value in the range 0 to 59 indicating the number of seconds to set.
Number

Sets the year of a specified Date object according to local time, as a difference between the current year and 1900.

year Number An integer value indicating the year to set.
String

Returns the date as a string.

String

Returns the date and time adjusted to GMT (UTC) as a string.

String

Returns the date as a localized string.

String

Returns a string value representing the date and time stored in the Date object in human readable format (localized).

String

Returns the time as a localized string.

String

Creates a string representation of this object that can be fed back to eval() to re-create an object. Works only with built-in classes.

String

Returns a string value representing the date and time stored in the Date object in human readable format.

String

Returns the time as a string.

String

Returns the date and time adjusted to UTC as a string.

Number

The valueOf() method returns the number of milliseconds that have passed since midnight, Returns an integer.

Object of 5

Properties elsewhere that hold a Date.

Return 3

Methods that return a Date.