Date Date Object
Last updated: 2026-09-09
Date Date Object
Date is the built-in date object.
| Category | Dates |
|---|---|
| ES version | ES1 |
📝 Syntax
const now = new Date();
▶ Example
Edit the code, press Run, and see the result in the output panel:
Output:
2026
9
2026-09-09T07:32:02.339Z
⚠️ Warning getMonth() returns 0-11.
🏷️ Related Items
💡 Related Cases
More case studies coming soon — check back later.
📚 Related Tutorials
❓ FAQ
QWhy is getMonth 0-based?
AHistorical design.
QHow to format?
AtoISOString().slice(0, 10).
QTimezone?
AgetHours is local; toISOString is UTC.