getDate()
:
Number
Returns the day of the month where the value is a Number from 1 to 31.
getDay()
:
Number
Returns the day of the week where the value is a Number from 0 to 6.
getHours()
:
Number
Return the hours field of the Date where the value is a Number from 0 (midnight) to 23 (11 PM).
getMinutes()
:
Number
Return the minutes field of the Date where the value is a Number from 0 to 59.
getMonth()
:
Number
Returns the month of the year as a value between 0 and 11.
getSeconds()
:
Number
Return the seconds field of the Date where the value is a Number from 0 to 59.
getTime()
:
Number
Returns the internal, millisecond representation of the Date object.
getUTCDate()
:
Number
Returns the day of the month where the value is a Number from 1 to 31 when date is expressed in universal time.
getUTCDay()
:
Number
Returns the day of the week where the value is a Number from 0 to 6 when date is expressed in universal time.
getUTCHours()
:
Number
Return the hours field, expressed in universal time, of the Date where the value is a Number from 0 (midnight) to 23 (11 PM).
getUTCMinutes()
:
Number
Return the minutes field, expressed in universal time, of the Date where the value is a Number from 0 to 59.
getUTCMonth()
:
Number
Returns the month of the year that results when the Date is expressed in universal time.
getUTCSeconds()
:
Number
Return the seconds field, expressed in universal time, of the Date where the value is a Number from 0 to 59.
static now()
:
Number
Returns the number of milliseconds since midnight of January 1, 1970 up until now.
static parse(dateString
:
String)
:
Number
Takes a date string and returns the number of milliseconds since midnight of January 1, 1970.
setDate(date
:
Number)
:
Number
Sets the day of the month where the value is a Number from 1 to 31.
setTime(millis
:
Number)
:
Number
Sets the number of milliseconds between the desired date and time and January 1, 1970.
setUTCDate(date
:
Number)
:
Number
Sets the day of the month, expressed in universal time, where the value is a Number from 1 to 31.
setUTCMonth(month
:
Number, date
:
Number...)
:
Number
Sets the month of the year, expressed in universal time, where the value is a Number from 0 to 11.
toDateString()
:
String
Returns the Date as a String value where the value represents the date portion of the Date in the default locale (en_US).
toISOString()
:
String
This function returns a string value represent the instance in time represented by this Date object.
toJSON(key
:
String)
:
Object
This function returns the same string as Date.prototype.toISOString().
toLocaleDateString()
:
String
Returns the Date as a String value where the value represents the date portion of the Date in the default locale (en_US).
toLocaleTimeString()
:
String
Returns the Date as a String value where the value represents the time portion of the Date in the default locale (en_US).
toTimeString()
:
String
Returns the Date as a String value where the value represents the time portion of the Date in the default locale (en_US).
toUTCString()
:
String
Returns a String representation of this Date, expressed in universal time.
static UTC(year
:
Number, month
:
Number, args
:
Number...)
:
Number
Returns the number of milliseconds since midnight of January 1, 1970 according to universal time.
valueOf()
:
Object
Returns the value of this Date represented in milliseconds.
getDate
Returns the day of the month where the value is a Number from 1 to 31.
Returns:
the day of the month where the value is a Number from 1 to 31.
getDay
Returns the day of the week where the value is a Number from 0 to 6.
Returns:
the day of the month where the value is a Number from 0 to 6.
getFullYear
Returns the year of the Date in four-digit format.
Returns:
the year of the Date in four-digit format.
getHours
Return the hours field of the Date where the value is a Number from 0 (midnight) to 23 (11 PM).
Returns:
the hours field of the Date where the value is a Number from 0 (midnight) to 23 (11 PM).
getMilliseconds
Returns the milliseconds field of the Date.
Returns:
the milliseconds field of the Date.
getMinutes
Return the minutes field of the Date where the value is a Number from 0 to 59.
Returns:
the minutes field of the Date where the value is a Number from 0 to 59.
getMonth
Returns the month of the year as a value between 0 and 11.
Returns:
the month of the year as a value between 0 and 11.
getSeconds
Return the seconds field of the Date where the value is a Number from 0 to 59.
Returns:
the seconds field of the Date where the value is a Number from 0 to 59.
getTime
Returns the internal, millisecond representation of the Date object. This value is independent of time zone.
Returns:
the internal, millisecond representation of the Date object.
getTimezoneOffset
Returns the difference between local time and Greenwich Mean Time (GMT) in minutes.
Returns:
the difference between local time and Greenwich Mean Time (GMT) in minutes.
getUTCDate
Returns the day of the month where the value is a Number from 1 to 31 when date is expressed in universal time.
Returns:
the day of the month where the value is a Number from 1 to 31 when date is expressed in universal time.
getUTCDay
Returns the day of the week where the value is a Number from 0 to 6 when date is expressed in universal time.
Returns:
the day of the week where the value is a Number from 0 to 6 when date is expressed in universal time.
getUTCFullYear
Returns the year when the Date is expressed in universal time. The return value is a four-digit format.
Returns:
the year of the Date in four-digit form.
getUTCHours
Return the hours field, expressed in universal time, of the Date where the value is a Number from 0 (midnight) to
23 (11 PM).
Returns:
the hours field, expressed in universal time, of the Date where the value is a Number from 0 (midnight) to 23 (11 PM).
getUTCMilliseconds
Returns the milliseconds field, expressed in universal time, of the Date.
Returns:
the milliseconds field, expressed in universal time, of the Date.
getUTCMinutes
Return the minutes field, expressed in universal time, of the Date where the value is a Number from 0 to 59.
Returns:
the minutes field, expressed in universal time, of the Date where the value is a Number from 0 to 59.
getUTCMonth
Returns the month of the year that results when the Date is expressed in universal time. The return value is a
Number betwee 0 and 11.
Returns:
the month of the year as a value between 0 and 11.
getUTCSeconds
Return the seconds field, expressed in universal time, of the Date where the value is a Number from 0 to 59.
Returns:
the seconds field, expressed in universal time, of the Date where the value is a Number from 0 to 59.
now
Returns the number of milliseconds since midnight of January 1, 1970 up until now.
Returns:
the number of milliseconds since midnight of January 1, 1970.
parse
Takes a date string and returns the number of milliseconds since midnight of January 1, 1970.
Supports:
- RFC2822 date strings
- strings matching the exact ISO 8601 format 'YYYY-MM-DDTHH:mm:ss.sssZ'
Parameters:
dateString
-
represents a Date in a valid date format.
Returns:
the number of milliseconds since midnight of January 1, 1970 or NaN if no date could be recognized.
setDate
Sets the day of the month where the value is a Number from 1 to 31.
Parameters:
date
-
the day of the month.
Returns:
the millisecond representation of the adjusted date.
setFullYear
Sets the full year of Date where the value must be a four-digit Number. Optionally, you can set the month and
date.
Parameters:
year
-
the year as a four-digit Number.
args
-
the month and day of the month.
Returns:
the millisecond representation of the adjusted date.
setHours
Sets the hours field of this Date instance. The minutes value should be a Number from 0 to 23. Optionally, hours,
seconds and milliseconds can also be provided.
Parameters:
hours
-
the minutes field of this Date instance.
args
-
the hours, seconds and milliseconds values for this Date instance.
Returns:
the millisecond representation of the adjusted date.
setMilliseconds
Sets the milliseconds field of this Date instance.
Parameters:
millis
-
the milliseconds field of this Date instance.
Returns:
the millisecond representation of the adjusted date.
setMinutes
Sets the minutes field of this Date instance. The minutes value should be a Number from 0 to 59. Optionally,
seconds and milliseconds can also be provided.
Parameters:
minutes
-
the minutes field of this Date instance.
args
-
the seconds and milliseconds value for this Date instance.
Returns:
the millisecond representation of the adjusted date.
setMonth
Sets the month of the year where the value is a Number from 0 to 11. Optionally, you can set the day of the
month.
Parameters:
month
-
the month of the year.
date
-
the day of the month.
Returns:
the millisecond representation of the adjusted date.
setSeconds
Sets the seconds field of this Date instance. The seconds value should be a Number from 0 to 59. Optionally,
milliseconds can also be provided.
Parameters:
seconds
-
the seconds field of this Date instance.
millis
-
the milliseconds field of this Date instance.
Returns:
the millisecond representation of the adjusted date.
setTime
Sets the number of milliseconds between the desired date and time and January 1, 1970.
Parameters:
millis
-
the number of milliseconds between the desired date and time and January 1, 1970.
Returns:
the millisecond representation of the adjusted date.
setUTCDate
Sets the day of the month, expressed in universal time, where the value is a Number from 1 to 31.
Parameters:
date
-
the day of the month, expressed in universal time.
Returns:
the millisecond representation of the adjusted date.
setUTCFullYear
Sets the full year, expressed in universal time, of Date where the value must be a four-digit Number. Optionally,
you can set the month and date.
Parameters:
year
-
the year as a four-digit Number, expressed in universal time.
args
-
the month and day of the month.
Returns:
the millisecond representation of the adjusted date.
setUTCHours
Sets the hours field, expressed in universal time, of this Date instance. The minutes value should be a Number
from 0 to 23. Optionally, seconds and milliseconds can also be provided.
Parameters:
hours
-
the minutes field, expressed in universal time, of this Date instance.
args
-
the seconds and milliseconds value, expressed in universal time, for this Date instance.
Returns:
the millisecond representation of the adjusted date.
setUTCMilliseconds
Sets the milliseconds field, expressed in universal time, of this Date instance.
Parameters:
millis
-
the milliseconds field, expressed in universal time, of this Date instance.
Returns:
the millisecond representation of the adjusted date.
setUTCMinutes
Sets the minutes field, expressed in universal time, of this Date instance. The minutes value should be a Number
from 0 to 59. Optionally, seconds and milliseconds can also be provided.
Parameters:
minutes
-
the minutes field, expressed in universal time, of this Date instance.
args
-
the seconds and milliseconds values, expressed in universal time, for this Date instance.
Returns:
the millisecond representation of the adjusted date.
setUTCMonth
Sets the month of the year, expressed in universal time, where the value is a Number from 0 to 11. Optionally,
you can set the day of the month.
Parameters:
month
-
the month of the year, expressed in universal time.
date
-
the day of the month.
Returns:
the millisecond representation of the adjusted date.
setUTCSeconds
Sets the seconds field, expressed in universal time, of this Date instance. The seconds value should be a Number
from 0 to 59. Optionally, milliseconds can also be provided.
Parameters:
seconds
-
the seconds field, expressed in universal time, of this Date instance.
millis
-
the milliseconds field, expressed in universal time, of this Date instance.
Returns:
the millisecond representation of the adjusted date.
toDateString
Returns the Date as a String value where the value represents the date portion of the Date in the default
locale (en_US). To format a calendar object in an alternate format use the
dw.util.StringUtils.formatCalendar()
functions instead.
Returns:
the Date as a String value.
toISOString
This function returns a string value represent the instance in time represented by this Date object. The date is
formatted with the Simplified ISO 8601 format as follows: YYYY-MM-DDTHH:mm:ss.sssTZ. The time zone is always UTC,
denoted by the suffix Z.
Returns:
string representation of this date
toJSON
This function returns the same string as Date.prototype.toISOString(). The method is called when a Date object is
stringified.
Parameters:
key
-
the name of the key, which is stringified
Returns:
JSON string representation of this date
toLocaleDateString
Returns the Date as a String value where the value represents the date portion of the Date in the default
locale (en_US). To format a calendar object in an alternate format use the
dw.util.StringUtils.formatCalendar()
functions instead.
Returns:
returns the date portion of the Date as a String.
toLocaleString
Returns the Date as a String using the default locale (en_US). To format a calendar object in an alternate format
use the dw.util.StringUtils.formatCalendar()
functions instead.
Returns:
the Date as a String using the default locale en_US
toLocaleTimeString
Returns the Date as a String value where the value represents the time portion of the Date in the default
locale (en_US). To format a calendar object in an alternate format use the
dw.util.StringUtils.formatCalendar()
functions instead.
Returns:
returns the time time's portion of the Date as a String.
toTimeString
Returns the Date as a String value where the value represents the time portion of the Date in the default
locale (en_US). To format a calendar object in an alternate format use the
dw.util.StringUtils.formatCalendar()
functions instead.
Returns:
the Date's time.
toUTCString
Returns a String representation of this Date, expressed in universal time.
Returns:
a String representation of this Date, expressed in universal time.
UTC
Returns the number of milliseconds since midnight of January 1, 1970 according to universal time. Optionally, you
can pass up to five additional arguments representing date, hours, minutes, seconds, and milliseconds.
Parameters:
year
-
a number representing the year.
month
-
a number representing the month.
args
-
a set of numbers representing the date, hours, minutes, seconds, and milliseconds.
Returns:
the number of milliseconds since midnight of January 1, 1970 according to universal time.
valueOf
Returns the value of this Date represented in milliseconds.
Returns:
the value of this Date represented in milliseconds.