JS: Date Object

By Xah Lee. Date: . Last updated: .

Date is the value of the property key "Date" of the global object. [JS: the Global Object]

console.log ( window.Date === Date ); // true


Date is a function.

[see JS: Value Types]

console.log ( typeof Date === "function" ); // true


Parent of Date is Function.prototype.

console.log ( Reflect.getPrototypeOf ( Date ) === Function.prototype ); // true


Purpose of Date is:

  1. To create a date instance. (by new Date(…))
  2. Used as a namespace to hold static methods for working with date. For example, Date.parse(string).
  3. Holds the property key "prototype". The value of Date.prototype is the root parent object of all date instances. [see JS: Prototype and Inheritance]

Date Constructor

JS: Date Constructor


JS Date

  1. JS: Date Tutorial
  2. JS: Date.parse
  3. JS: Compute Date Range
  4. JS: Date Object
  5. JS: Date Constructor
  6. JS: Date.prototype

JS Object Reference

  1. Global
  2. Object
  3. Array
  4. Function
  5. String
  6. RegExp
  7. Date
  8. Set
  9. Map
  10. JSON
  11. Math
  12. Reflect
  13. Number
  14. Boolean
  15. Symbol
Like it? Help me by telling your friends. Or, Put $5 at patreon.

Or, Buy JavaScript in Depth

If you have a question, put $5 at patreon and message me.

Web Dev Tutorials