Date class works with date value.
Method | Description |
Date getDate() Method | The getDate() method returns the day of the month (from 1 to 31) for the date object.
|
Date getDay() Method | The getDay() method returns the day of the week (from 0 to 6) from the date object.
|
Date getFullYear() Method | The getFullYear() method returns the year as four digits for dates between year 1000 and 9999 from the date object.
|
Date getHours() Method | The getHours() method returns the hour ranged from 0 to 23 of the date object.
|
Date getMilliseconds() Method | The getMilliseconds() method returns the milliseconds ranged from 0 to 999 of the date object.
|
Date getMinutes() Method | The getMinutes() method returns the minutes ranged from 0 to 59 of the date object.
|
Date getMonth() Method | The getMonth() method returns the month ranged from 0 to 11 from the date object in local time.
|
Date getSeconds() Method | The getSeconds() method returns the seconds ranged from 0 to 59 from the date object.
|
Date getTime() Method | The getTime() method returns the number of milliseconds between midnight of January 1, 1970 and the date object.
|
Date getTimezoneOffset() Method | The getTimezoneOffset() method returns the time difference between UTC time and local time, in minutes.
|
Date getUTCDate() Method | The getUTCDate() method returns the day of the month ranged from 1 to 31 from the date object, according to universal time.
|
Date getUTCDay() Method | The getUTCDay() method returns the day of the week ranged from 0 to 6 for the date object, according to universal time.
|
Date getUTCFullYear() Method | The getUTCFullYear() method returns the year as four digits for dates between year 1000 and 9999 of the date object, according to universal time.
|
Date getUTCHours() Method | The getUTCHours() method returns the hour ranged from 0 to 23 of date object, according to universal time.
|
Date getUTCMilliseconds() Method | The getUTCMilliseconds() method returns the milliseconds ranged from 0 to 999 from the date object, according to universal time.
|
Date getUTCMinutes() Method | The getUTCMinutes() method returns the minutes ranged from 0 to 59 of the date object, according to universal time.
|
Date getUTCMonth() Method | The getUTCMonth() method returns the month ranged from 0 to 11 for the specified date, according to universal time.
|
Date getUTCSeconds() Method | The getUTCSeconds() method returns the seconds ranged from 0 to 59 of the date object, according to universal time.
|
Date now() Method | The now() method returns the number of milliseconds since January 1, 1970 00:00:00 UTC.
|
Date parse() Method | The parse() method parses a date string and returns the number of milliseconds between the date and midnight of January 1, 1970.
|
Date setDate() Method | The setDate() method sets the day of the month to the date object.
|
Date setFullYear() Method | The setFullYear() method sets the year using four digits for dates between year 1000 and 9999 for the date object.
|
Date setHours() Method | The setHours() method sets the hour of a date object.
|
Date setMilliseconds() Method | The setMilliseconds() method sets the milliseconds of a date object.
|
Date setMinutes() Method | The setMinutes() method sets the minutes of a date object.
|
Date setMonth() Method | The setMonth() method sets the month of a date object.
|
Date setSeconds() Method | The setSeconds() method sets the seconds of a date object.
|
Date setTime() Method | The setTime() method sets a date and time by adding/subtracting a specified number of milliseconds to/from midnight January 1, 1970.
|
Date setUTCDate() Method | The setUTCDate() method sets the day of the month, according to the UTC time.
|
Date setUTCFullYear() Method | The setUTCFullYear() method sets the year (four digits for dates between year 1000 and 9999) of a date object, according the UTC time.
|
Date setUTCHours() Method | The setUTCHours() method sets the hour of a date object, according to the UTC time.
|
Date setUTCMilliseconds() Method | The setUTCMilliseconds() method sets the milliseconds between 0 to 999, according to universal time.
|
Date setUTCMinutes() Method | The setUTCMinutes() method sets the minutes of a date object, according to UTC time.
|
Date setUTCMonth() Method | The setUTCMonth() method sets the month ranged from 0 to 11, according to universal time.
|
Date setUTCSeconds() Method | The setUTCSeconds() method sets the seconds of a date object, according to UTC time time.
|
Date toDateString() Method | The toDateString() method converts the date part of a Date object into a readable string.
|
Date toISOString() Method | The toISOString() method converts a Date object into a string, using the ISO-8601 standard.
|
Date toJSON() Method | The toJSON() method converts a Date object a JSON date in string.
|
Date toLocaleDateString() Method | The toLocaleDateString() method converts the date part of a Date object into a readable string, using locale settings.
|
Date toLocaleString() Method | The toLocaleString() method converts a Date object to a string, using locale settings.
|
Date toString() Method | The toString() method converts a Date object to a string.
|
Date valueOf() Method | The valueOf() method returns the primitive value of a Date object.
|
Date toLocaleTimeString() Method | The toLocaleTimeString() method returns the time part of a Date object as a string, using locale conventions.
|
Date UTC() Method | The UTC() method returns the number of milliseconds between a specified date and midnight of January 1, 1970, according to universal time.
|
Date toTimeString() Method | The toTimeString() method converts the time portion of a Date object to a string.
|
Date toUTCString() Method | The toUTCString() method converts a Date object to a string, according to universal time.
|