var mydate = new Date ();
mydate.getyear (); get Current year (2 -bit )
mydate.getfullyear (); get the full year (4 -bit , 1970-????)
Mydate.getmonth (); get the current month (0-11,0 represents 1 months )
mydate.getdate (); get current day (1-31)
Mydate.getday (); get current Week X (0-6,0 for Sunday )
Mydate.gettime (); gets the current time ( The number of milliseconds starting from 1970.1.1 )
mydate.gethours (); gets the current number of hours (0-23)
mydate.getminutes (); gets the current number of minutes (0-59)
mydate.getseconds (); gets the current number of seconds (0-59)
mydate.getmilliseconds (); gets the current number of milliseconds (0-999)
mydate.tolocaledatestring (); get current date
var mytime=mydate.tolocaletimestring (); get current time
mydate.tolocalestring (); get date and time
Date Time Script Library Methods list
Date. Prototype.isleapyear Judging leap years
Date.prototype.Format date formatting
Date.prototype.DateAdd Date Calculation
Date.prototype.DateDiff Comparison date difference
Date.prototype.toString Date to string
Date.prototype.toArray date split into arrays
Date.prototype.DatePart Partial information of the date taken
Date.prototype.MaxDayOfDate The maximum of the month in which the date is taken days
Date.prototype.WeekNumOfYear The week of the year in which the date is judged
stringtodate string to date type
isvaliddate Verifying date validity
checkdatetime Full date and time check
daysbetween Date days difference
Welcome to watch my online Java full set of free teaching super Clear Video:
Http://v.youku.com/v_show/id_XODQ1NjU0NDc2.html This is one of the video connections, you can drag to the Youku video below, subscribe to my account, because later I will have more videos provided free of charge
Baidu Search: Enter the Fcs_d, or enter "Hu Bojun" can see a lot of my video
Or add my number: Fcsboy I can notify you in time.
QQ Learning Group: 237053693
Hu Bojun on JS Get the current Time method collection