From W3school, the first part is the get operation, the second part is the set operation.
Date Object method
Method |
Description |
Date () |
Returns the date and time of day. |
GetDate () |
Returns the day of the one month (1 ~ 31) from the Date object. |
GetDay () |
Returns the day of the week from a Date object (0 ~ 6). |
GetMonth () |
Returns the month (0 ~ 11) from the Date object. |
getFullYear () |
Returns the year as a four-digit number from a Date object. |
GetYear () |
Please use the getFullYear () method instead. |
GetHours () |
Returns the hour (0 ~ 23) of the Date object. |
Getminutes () |
Returns the minute (0 ~ 59) of the Date object. |
Getseconds () |
Returns the number of seconds (0 ~ 59) of the Date object. |
Getmilliseconds () |
Returns the milliseconds (0 ~ 999) of the Date object. |
SetDate () |
Sets the day of the month in the Date object (1 ~ 31). |
Setmonth () |
Sets the month (0 ~ 11) in the Date object. |
setFullYear () |
Sets the year (four digits) in the Date object. |
Setyear () |
Please use the setFullYear () method instead. |
Sethours () |
Sets the hour (0 ~ 23) in the Date object. |
Setminutes () |
Sets the minute (0 ~ 59) in the Date object. |
Setseconds () |
Sets the second (0 ~ 59) in the Date object. |
Setmilliseconds () |
Sets the milliseconds (0 ~ 999) in the Date object. |
SetTime () |
Sets the Date object in milliseconds. |
JS Date Class Learning notes