Home > Web Front-end > JS Tutorial > JavaScript Date object date acquisition function_time and date

JavaScript Date object date acquisition function_time and date

WBOY
Release: 2016-05-16 18:13:45
Original
1051 people have browsed it

A small example of using JavaScript Date object:

Run result:

Summary:

1. Although we think December is the 12th month, JavaScript starts counting months from 0, so month 11 means December;

2. nowDate.setDate(33); JavaScript knows that there are no 33 days in December, only 31 days, so it returns January 2 to us;

Attachment: List of Date methods

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