- Home
- /
- Tutorials
- /
- JavaScript Tutorial
- /
- JavaScript Dates
JavaScript Dates
JavaScript Dates
The Date object represents a single moment in time.
A date is stored as the number of milliseconds since the start of 1970.
Everything else is a way of reading or displaying that number.
Example
Example
javascript
const date = new Date(2026, 0, 15);
console.log(date.getFullYear());
console.log(date.getDate());The output is 2026 then 15.
