SoFunction
Updated on 2025-04-05

JavaScript Core Reference Tutorial Built-in Objects

getDate() Return to a certain day in the month.
getDay() Return to a day of the week.
getFullYear() Returns the year in the date.
getUTCFullYear() Same as above.
getHours() Returns the hour field of the object.
getUTCHours() Same as above.
getMilliseconds() Returns the millisecond field of the object.
getUTCMilliseconds() Same as above.
getMinutes() Returns the minute field of the object.
getUTCMinutes() Same as above.
getMouth() Returns the month field of the object.
getUTCMouth() Same as above.
getSeconds() Returns the second field of the object.
getUTCSeconds() Same as above.
getTime() Returns the millisecond representation inside the object.
getTimezoneoffset() Returns the time difference between the local time and UTC representation of this date, in minutes.
getYear() It is recommended to use getFullYear().
setDate() Sets a day in the object month.
setUTCDate() Same as above.
setFullYear() Sets the year field in the object.
setUTCFullYear() Same as above.
setHours() Sets the hour field of the object.
setUTCHours() Same as above.
setMilliseconds() Sets the millisecond field of the object.
setUTCMilliseconds() Same as above.
setMinutes() Sets the minute field of the object.
setUTCMinutes() Same as above.
setMouth() Sets the month field of the object.
setUTCMouth() Same as above.
setSeconds() Sets the second field of the object.
setUTCSeconds() Same as above.
setTime() Set the fields of the object in milliseconds.
setYear() It is recommended to use setFullYear().
toDateString() Returns a string representation of the date part of the date.
toGMTString() It is recommended toUTCString().
toLacaleDataString() Returns a string representation of the date part of the date.
toLocaleString() Converts an object into a string.
toLacaleTimeString() Returns a string representation of the time part of the date.
toString() Converts an object into a string.
toTimeString() Converts an object into a string.
toString() Returns a string representation of the time part of the date.
toUTCString() Converts an object into a string.
valueOf() Converts an object to its internal millisecond format.
parse() Static method parses the string representation of date and time, returning its internal millisecond representation.
UTC() Static method, returning a millisecond representation of the specified UTC date and time.