Date API
Creating, getting, and manipulating dates and times.
Date objects represent points in time independent of any particular time zone. A Date object is created with new Date() and contains a Number that represents milliseconds since January 1, 1970, 00:00:00 UTC.
The Date constructor provides various forms for creating date objects based on the current date/time, specified date/time components, timestamps, or date strings. Methods such as getDate(), getMonth(), and getFullYear() extract date components, while setDate(), setMonth(), and setFullYear() modify date values. Time-specific methods like getHours(), getMinutes(), getSeconds() and their setter counterparts handle time components.
Date objects include conversion methods like toLocaleDateString() and toLocaleTimeString() for local formatting, and toISOString() for standardized string representation. Calculation methods such as getTime() and valueOf() provide timestamps, enabling date arithmetic.