Home >Web Front-end >JS Tutorial >Exercises on javascript time objects_time and date

Exercises on javascript time objects_time and date

WBOY
WBOYOriginal
2016-05-16 18:57:121402browse

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)


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn