Home >>JavaScript Date Object Methods

JavaScript Date Object Methods

JavaScript Date Object Properties

Parameter Values

Parameter Description
constructor It is used to get the function that created the Date object's prototype.
prototype It is used to add properties and methods to an object.

JavaScript Date Object Methods

Method Description
getDate() It is used to return the day of the month.
getDay() It is used to return the day of the week.
getFullYear() It is used to return the year.
getHours() It is used to return the hour.
getMilliseconds() It is used to return the milliseconds.
getMinutes() It is used to return the minutes.
getMonth() It is used to return the month.
getSeconds() It is used to return the seconds.
getTime() It is used to return the number of milliseconds since midnight Jan 1 1970 and any specified date.
getTimezoneOffset() It is used to return the time difference between UTC time and local time in minute.
getUTCDate() It is used to return the day of the month according to universal time.
getUTCDay() It is used to return the day of the week according to universal time.
getUTCFullYear() It is used to return the year according to universal time.
getUTCHours() It is used to return the hour according to universal time.
getUTCMilliseconds() It is used to return the milliseconds according to universal time.
getUTCMinutes() It is used to return the minutes according to universal time.
getUTCMonth() It is used to return the month according to universal time.
getUTCSeconds() It is used to return the second according to universal time.
now() It is used to return the number of milliseconds since midnight Jan 1, 1970.
parse() It is used to parse a date string and return the number of milliseconds.
setDate() It is used to set day of the month of a date object.
setFullYear() It is used to set year of a date object.
setHours() It is used to set hour of a date object.
setMilliseconds() It is used to set milliseconds of a date object.
setMinutes() It is used to set minutes of a date object.
setMonth() It is used to set month of a date object.
setSeconds() It is used to set seconds of a date object.
setTime() It is used to set a date to a specified number of milliseconds after/before January 1, 1970.
setUTCDate() It is used to set the day of the month of a date object according to universal time.
setUTCFullYear() It is used to set the year of a date object according to universal time.
setUTCHours() It is used to set the hour of a date object according to universal time.
setUTCMilliseconds() It is used to set the milliseconds of a date object according to universal time.
setUTCMinutes() It is used to set the minute of a date object according to the universal time.
setUTCMonth() It is used to set the month of a date object according to the universal time
setUTCSeconds() It is used to set the second of a date object according to the universal time.
toDateString() It is used to convert the date portion of a Date object into a readable string.
toISOString() It is used to return the date as a string using the ISO standard.
toJSON() It is used to return the date as a string formatted as a JSON date.
toLocaleDateString() It is used to return date portion of a Date object as a string using locale conventions.
toLocaleTimeString() It is used to return time portion of a Date object as a string using locale conventions.
toLocaleString() It is used to convert a Date object to a string using locale conventions.
toString() It is used to convert a Date object to a string.
toTimeString() It is used to convert the time portion of a Date object to a string.
toUTCString() It is used to convert a Date object to a string according to universal time.
UTC() It is used to return the number of milliseconds in a date since midnight of January 1, 1970 according to UTC time.
valueOf() It is used to return the primitive value of a Date object.

JavaScript Date Object Methods Index

Sr.No. Topics
1 JavaScript Date constructor Property
2 JavaScript Date prototype Property
3 JavaScript getDate() Method
4 JavaScript getDay() Method
5 JavaScript getFullYear() Method
6 JavaScript getHours() Method
7 JavaScript getMilliseconds() Method
8 JavaScript getMinutes() Method
9 JavaScript getMonth() Method
10 JavaScript getSeconds() Method
11 JavaScript getTime() Method
12 JavaScript getTimezoneOffset() Method
13 JavaScript getUTCDate() Method
14 JavaScript getUTCDay() Method
15 JavaScript getUTCFullYear() Method
16 JavaScript getUTCHours() Method
17 JavaScript getUTCMilliseconds() Method
18 JavaScript getUTCMinutes() Method
19 JavaScript getUTCMonth() Method
20 JavaScript getUTCSeconds() Method
21 JavaScript now() Method
22 JavaScript Date parse() Method
23 JavaScript setDate() Method
24 JavaScript setFullYear() Method
25 JavaScript setHours() Method
26 JavaScript setMilliseconds() Method
27 JavaScript setMinutes() Method
28 JavaScript setMonth() Method
29 JavaScript setSeconds() Method
30 JavaScript setTime() Method
31 JavaScript setUTCDate() Method
32 JavaScript setUTCFullYear() Method
33 JavaScript setUTCHours() Method
34 JavaScript setUTCMilliseconds() Method
35 JavaScript setUTCMinutes() Method
36 JavaScript setUTCMonth() Method
37 JavaScript setUTCSeconds() Method
38 JavaScript toDateString() Method
39 JavaScript toISOString() Method
40 JavaScript toJSON() Method
41 JavaScript toLocaleDateString() Method
42 JavaScript toLocaleString() Method
43 JavaScript toLocaleTimeString() Method
44 JavaScript Date toString() Method
45 JavaScript Date toTimeString() Method
46 JavaScript Date toUTCString() Method
47 JavaScript Date UTC() Method
48 JavaScript Date valueOf() Method

No Sidebar ads