🚧 under construction
Last updated 1 year ago
JS ⟩ object ⟩ built-in ⟩ Date
points in time.
new Date() // current date and time // month starts from 0, be careful❗️ new Date(2009, 11, 9) // December❗️ new Date(2009, 11, 9, 12, 59, 59, 999)
month numbers start at 0 (11 = December),
day numbers start at 1.
This is confusing and silly. Be careful
Date is the only built-in type that uses "prefer-string" object -> primitive conversion algorithm.
// Timestamps: // - milliseconds since the start of 1970 (UTC time zone). new Date(2013, 11, 19).getTime() // 1387407600000 Date.now // (current timestamp)
Eloquent JS ⟩ The Date Class
Date