Skip to content

API ReferenceAdvanced utilities and typesFunction

ethereumTimestampToDate()

function ethereumTimestampToDate(b): Date;

Converts a protocol Unix-seconds bigint (as carried on LetterOfCredit timestamps) to a JavaScript Date. Inverse of dateToEthereumTimestamp. Values beyond Number.MAX_SAFE_INTEGER seconds lose precision.

Parameters

ParameterTypeDescription
bbigintUnix seconds since the epoch.

Returns

Date

The equivalent Date.