JavaScript Date Object – Detailed Chart
1. Creating Date
Method Description Example
new Date() Current date and time new Date()
new Date(ms) From milliseconds since 1970 new Date(0)
new Date(dateString) From string new Date('2026-03-22')
new Date(y, m, d) Custom date new Date(2026, 2, 22)
2. Get Methods
Method Description
getFullYear() Returns year
getMonth() Returns month (0–11)
getDate() Returns day
getDay() Returns weekday (0–6)
getHours() Returns hours
getMinutes() Returns minutes
getSeconds() Returns seconds
3. Formatting Methods
Method Description
toDateString() Readable date
toTimeString() Full time
toLocaleDateString() Local date
toLocaleTimeString() Local time
toISOString() ISO format
Important Notes:
Months are zero-based (0 = January).
getDay() gives weekday, getDate() gives actual date.
Time format depends on system settings.