JavaScript Date Properties

About This Index
This page is the JavaScript Date Properties index for the tutorial track. Date stores one timestamp inside the object. You read the calendar parts with methods, not with fields named year or month.
Learn what a Date is on /js/date. Functions such as getFullYear() and toISOString() live on the Date Methods index.
birthday.constructor and Date.length are values. birthday.getFullYear() is a method, so it needs parentheses.
How to Read a Date Property
Properties are values. No parentheses:
const birthday = new Date(2026, 0, 15);
birthday.constructor === Date; // true
Date.prototype.getFullYear; // the method function
Date.length; // 7
Date.name; // "Date" JavaScript Date Properties Table
Properties on a Date value and on the Date function (4 entries).
On a Date value
1 propertyRead this on a date you created with new Date(). Year, month, and day are not properties.
| Property | Description | Guide |
|---|---|---|
constructor | The function that created the date. For an object from new Date(), constructor is Date. | On this page |
On the Date function
3 propertiesRead these on Date itself. They describe the constructor, not a moment in time.
| Property | Description | Guide |
|---|---|---|
prototype | Shared object where getFullYear(), toISOString(), setDate(), and the other Date methods live. | Open |
length | Date.length is 7: year, month, day, hours, minutes, seconds, and milliseconds. | On this page |
name | Date.name is "Date", the name of the constructor function. | On this page |
Frequently Asked Questions
Read the calendar with methods
Year, month, and day are getters. Open the methods index.
8 people found this page helpful
