Home > Web Front-end > JS Tutorial > body text

Exercises on javascript time objects_time and date

WBOY
Release: 2016-05-16 18:57:12
Original
1348 people have browsed it

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)


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!