Date & time
now() returns the current ISO 8601 timestamp, millis() the epoch milliseconds; fromMillis/toMillis convert between the two representations.
nowDate & time
now(): stringCurrent timestamp, ISO 8601.
millisDate & time
millis(): numberCurrent timestamp, milliseconds since the epoch.
fromMillisDate & time
fromMillis(millis: number): stringEpoch milliseconds → ISO 8601 string.
toMillisDate & time
toMillis(timestamp: string): numberISO 8601 (or any parseable date) string → epoch milliseconds.
now
now(): stringCurrent timestamp, ISO 8601.
typeflow
processedAt: now()millis
millis(): numberCurrent timestamp, milliseconds since the epoch.
typeflow
processedAtMs: millis()fromMillis
fromMillis(millis: number): stringEpoch milliseconds → ISO 8601 string.
typeflow
created: fromMillis(event.createdAt)toMillis
toMillis(timestamp: string): numberISO 8601 (or any parseable date) string → epoch milliseconds.
typeflow
createdAtMs: toMillis(event.createdAt)Playground
{ "created": "2025-07-02T00:00:00.000Z", "roundTrip": 1751414400000, "epoch": "1970-01-01T00:00:00.000Z" }
inferred type
{ created: string; roundTrip: number; epoch: string }