Date.UTC()
Returns the timestamp for date components interpreted as UTC.
Syntax
Date.UTC(year, monthIndex, day, hours, minutes, seconds, ms)
Returns
number — Milliseconds since the epoch for the given UTC components.
Examples
console.log(Date.UTC(1970, 0, 1));
Output
0
const ms = Date.UTC(2026, 4, 15);
console.log(new Date(ms).toISOString());
Output
2026-05-15T00:00:00.000Z
Notes
- The month argument is zero-based (0 = January).
- Unlike the `Date` constructor, components are treated as UTC, not
local time.
- Returns a number; wrap in `new Date(...)` to get a Date object.
Browser & runtime support
| Environment | Since version |
|---|---|
| chrome | 1.0 |
| firefox | 1.0 |
| safari | 1.0 |
| edge | 12 |
| node | 0.10 |