Home >Web Front-end >JS Tutorial >Exercises on javascript time objects_time and date
The DATE object provides three methods:
1. Get the current time and date from the system;
2. Set the current time and date;
3. Convert time and date to other formats.
setYear sets the current year
setMonth sets the current month
setDate sets the current date
setDay sets the number of weeks of the current object
setHours sets the current hour
setMinutes sets the current minutes
setSeconds sets the current seconds
setTime sets the current time (in milliseconds)