Date Object's Properties and Methods

xiaoxiao2021-03-05  31

The date Object's Properties and Methods Are Described Below:

NN: Netscape, IE: Internet Explorer

PROPERTIES

Syntax: Object.property_name

PropertyDescriptionnnie ConstructorContains the Function That Created An Object's Prototype44PrototypeAllows Addition of Properties to a date34

Methods

Syntax: Object.method_name ()

MethodDescriptionNNIEDate () Returns a Date object23getDate () Returns the date of a Date object (from 1-31) 23getDay () Returns the day of a Date object (from 0-6. 0 = Sunday, 1 = Monday, etc.) 23getMonth () Returns The Month of a Date Object (from 0-11. 0 = January, 1 = February, ETC.) 23Getfullyear () Returns The year of a date Object (four digits) 44GetyEAR () Returns the year of a date Object (from 0-99). Use getFullyear Instead !! 23gethours () Returns the Hour of a date Object (from 0-23) 23Getminutes () Returns the minute of a date object (from 0-59) 23Getseconds () Returns the second of a Date object (from 0-59) 23getMilliseconds () Returns the millisecond of a Date object (from 0-999) 44getTime () Returns the number of milliseconds since midnight 1 / 1-197023getTimezoneOffset () Returns the time difference between the user '

s computer and GMT23getUTCDate () Returns the date of a Date object in universal (UTC) time44getUTCDay () Returns the day of a Date object in universal time44getUTCMonth () Returns the month of a Date object in universal time44getUTCFullYear () Returns the four-digit year of a Date object in universal time44getUTCHours () Returns the hour of a Date object in universal time44getUTCMinutes () Returns the minutes of a Date object in universal time44getUTCSeconds () Returns the seconds of a Date object in universal time44getUTCMilliseconds () Returns the milliseconds of a Date object in universal time44parse () Returns a string date value that holds the number of milliseconds since January 01 1970 00: 00: 0023setDate () Sets the date of the month in the Date object (from 1-31) 23setFullYear () Sets the year in the Date object (four digits) 44setHours () Sets the hour in the Date object (from 0-23) 23setMilliseconds () Sets the millisecond in the Date object (from 0-999) 44setMinutes () Set the minute in the Date Object (Fr om 0-59) 23SETMONTH () Sets the Month in The Date Object (from 0-11. 0 = January, 1 = February) 23setseconds () sets the second in the date Object (from 0-59) 23settime () sets the Milliseconds after 1 / 1-197023seTyear () Sets the year in the date Object (009) 23setutcdate () SETED TIME (from 1-31) 44setutcDay () sets the day in the date Object, in Universal Time (from 0-6. Sunday = 0, Monday = 1, ETC.) 44setutcmonth () sets The Month in The Date Object, in Universal Time (from 0-11. 0 = January, 1 =

转载请注明原文地址:https://www.9cbs.com/read-38816.html

New Post(0)