Original: Js Date weeping Blood finishing
The JS Date object is used to process the date and time.
To create the syntax for a Date object:
var mydate=new Date ()
The Date object automatically saves the current date and time as its initial value.
There are 5 parameters in the form of:
New Date ("Month dd,yyyy hh:mm:ss"), new Date ("Month dd,yyyy"), new Date (YYYY,MTH,DD,HH,MM,SS), new Date (YYYY,MTH,DD), new Date (MS);
Note the last form, which represents the number of milliseconds between the time to create and the GMT time of January 1, 1970. The meanings of the various functions are as follows:
Month: The name of the months in English, from January to December
MTH: The month is represented by an integer, from 0-11 (January to December)
DD: Represents the day ordinal of one months, from 1 to 31
YYYY: four-digit year
HH: Hours, from 0 (midnight) to 23 (11 o'clock in the evening)
MM: Number of minutes, integers from 0 to 59
SS: Number of seconds, integers from 0 to 59
MS: Number of milliseconds, integer greater than or equal to 0
Such as:
New Date ("January 12,2006 22:19:35"); new Date ("January 12,2006"); new date (2006,0,12,22,19,35); new Date (2006,0,12); new Date (1137075575000); Date () Returns the day and time. GetDate () Returns the day of the one month (1 ~ 31) from the Date object. GetDay () Returns the day of the week (0 ~ 6) from the Date object. 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. GetTime () returns the number of milliseconds since January 1, 1970. getTimezoneOffset () returns the minute difference between local time and Greenwich Mean Time (GMT). getUTCDate () Returns the day of the month (1 ~ 31) from the Date object according to the world. GetUTCDay () Returns the day of the week (0 ~ 6) from the Date object according to the world. getUTCMonth () returns the month (0 ~ 11) from the Date object, depending on the world. getUTCFullYear () returns a four-digit year from a Date object according to the world. getUTCHours () returns the hour (0 ~ 23) of the Date object according to the universal. getUTCMinutes () returns the minute (0 ~ 59) of the date object according to the universal. getUTCSeconds () returns the second (0 ~ 59) of the Date object according to the universal. getUTCMilliseconds () returns the milliseconds (0 ~ 999) of a Date object based on the universal. Parse () returns the number of milliseconds from midnight January 1, 1970 to the specified date (string). SetDate () Sets the day of the month in the Date object (1 ~ 31). Setmonth () sets the Date pairLike the middle month (0 ~ 11). 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. SetUTCDate () Sets the day of the month in the Date object according to the world time (1 ~ 31). setUTCMonth () sets the month (0 ~ 11) in the Date object according to the world time. setUTCFullYear () sets the year (four digits) in the Date object according to the world time. setUTCHours () sets the hour (0 ~ 23) in the Date object according to the world time. setUTCMinutes () sets the minute (0 ~ 59) in the Date object according to the world time. setUTCSeconds () sets the seconds (0 ~ 59) in the Date object according to the world time. setUTCMilliseconds () sets the milliseconds (0 ~ 999) in the Date object according to the world time. Tosource () returns the source code of the object. ToString () Converts the Date object to a string. toTimeString () Converts the time portion of a Date object to a string. toDateString () Converts the date part of a Date object to a string. toGMTString () Please use the toutcstring () method instead. toUTCString () Converts the Date object to a string based on the universal. toLocaleString () Converts a Date object to a string based on the local time format. toLocaleTimeString () Converts the time portion of a Date object to a string, based on the local time format. toLocaleDateString () Converts the date part of a Date object to a string, based on the local time format. UTC () returns the number of milliseconds from January 1, 1997 to the specified date, depending on the time. ValueOf () returns the original value of the Date object. var objdate=new Date ([argUments list]);
Js Date Weeping Blood finishing