Expand description
JavaScript Date (global constructor). A Date is a plain object tagged
@@native = "Date" whose time value (milliseconds since the Unix epoch, or
NaN for an invalid date) lives in a hidden @@ms field.
The UTC-based surface is implemented in full: getTime/valueOf, the
toISOString/toUTCString/toString/toDateString/toTimeString/
toLocale* renderings, the field getters, the component SETTERS, the Annex-B
getYear/setYear, and the statics Date.now/Date.parse/Date.UTC.
Local-timezone getters and setters alias the UTC ones (node-js runs as if
TZ=UTC), which is the correct answer for the machine-readable date headers
express/send/fresh produce.
Constants§
- INSTANCE_
METHODS - Every method
instance_callbelow answers.valueOfandtoStringare on this list becauseObject.prototypehas methods by those names too: without the entry,host::call_methodhands a Date toobject_builtin_methodanddate.valueOf()returns the Date itself instead of its time value (so+dandd - 0wereNaN). - STATIC_
METHODS
Functions§
- construct
new Date(...).- instance_
call - Date instance methods (all treated as UTC — see the module note).
- static_
call Date.now()/Date.parse(str)/Date.UTC(...).