new Date () method is used

Gets the date and time

getFullYear () for a full year (browsers support)

getMonth () Gets 0-11 months

getDate ()                   Gets Day 1-31

 

getDay ()                   Gets week 0-6      

 

getHours ()                 Gets hours 0-23

getMinutes ()                 Gets minutes 0-59

the getSeconds ()                 Get second  0-59

the getMilliseconds ()             Get the current ms

 

getTime ()         Returns the total number of milliseconds ( from 1970/1/1 midnight )

Guess you like

Origin www.cnblogs.com/ustc-yy/p/12074702.html