Date Object
1. How to create
var New //The immediate return is now the current time
return format
(Day of the week, month and minute time zone)
2. Formatting methods for dates
Dateobject.todatestring (); Return to day of the month and year
Dateobject.totimestring (); Return time and seconds time zone
3. Date Time Build Method Dateobject.function ();
getTime () |
returns the number of milliseconds from 1970 to present (ValueOf () same) |
settime () |
set the number of milliseconds from 1970 to present thus up to Effect to change date |
getfullyear () |
get 4-digit year |
setfullyear () |
set year, change the number of milliseconds for a date object |
getMonth () |
get month (starting from 0, so add a is the current month) |
setmonth () |
set Month (out of Gagnin) |
getDate () |
Gets the number of |
setDate () |
Set the number (exceeds plus month) |
getDay () |
get Sunday-six corresponding 0-6 |
|
|
getHours () |
Get hours |
sethours () |
Set hours (over 24 plus days) |
getminutes () |
get minutes |
setminutes () |
set minutes |
getseconds () |
Gets the number of seconds |
setseconds () |
set seconds |
getmilliseconds () |
get milliseconds |
setmilliseconds () |
set number of milliseconds |
JavaScript (eight) Date object