The following methods are used to create a new time in javascript:
VaR today = new date ();
Returns the current date and time.
VaR newyear = new date (December 31,199 8 23:59:59 );
The input is the form string "month, day, year, hour: minute: second"
VaR bday = new date (75, 1, 16 );
The parameter value is year, month, or day.
VaR bday = new date (75, 1, 16, 12, 0, 0 );
The parameters are year, month, day, hour, minute, and second.
Originally in Program It is shown that there is no problem, but today we found a serious problem. If the last three methods are used today, the date will be set to 9-1.
Setdate ()
Set The day of the month (from 0 to 30)
Sethours ()
Set the hour (from 0 to 23)
Setminutes ()
Set the minute (from 0 to 59)
Setmonth ()
Set month (from 0 to 11)
Setseconds ()
Set the number of seconds (from 0 to 59)
Settime ()
Set the time (milliseconds since a.m)
Setyear ()
Set year
Set 8-31