Skip to content

timestamp

timestamp(value): number

Defined in: src/uuid/timestamp.ts:19

The creation time of a time-based UUID, in Unix milliseconds.

Versions 1, 6 and 7 carry a timestamp; the others do not, and throw.

string

number

timestamp(v7()); // 1756890764019
timestamp(v1()); // the same instant, read from a different layout
new Date(timestamp(v7())); // 2026-08-23T09:12:44.019Z