Date & heure
now() renvoie l'horodatage ISO 8601 courant, millis() les millisecondes epoch ; fromMillis/toMillis convertissent entre les deux représentations.
nowDate & heure
now(): stringHorodatage courant, ISO 8601.
millisDate & heure
millis(): numberHorodatage courant, en millisecondes depuis l'epoch.
fromMillisDate & heure
fromMillis(millis: number): stringMillisecondes epoch → chaîne ISO 8601.
toMillisDate & heure
toMillis(timestamp: string): numberChaîne ISO 8601 (ou toute date analysable) → millisecondes epoch.
now
now(): stringHorodatage courant, ISO 8601.
typeflow
processedAt: now()millis
millis(): numberHorodatage courant, en millisecondes depuis l'epoch.
typeflow
processedAtMs: millis()fromMillis
fromMillis(millis: number): stringMillisecondes epoch → chaîne ISO 8601.
typeflow
created: fromMillis(event.createdAt)toMillis
toMillis(timestamp: string): numberChaîne ISO 8601 (ou toute date analysable) → millisecondes epoch.
typeflow
createdAtMs: toMillis(event.createdAt)Playground
{ "created": "2025-07-02T00:00:00.000Z", "roundTrip": 1751414400000, "epoch": "1970-01-01T00:00:00.000Z" }
type inféré
{ created: string; roundTrip: number; epoch: string }