epochToDate
epochToDate(
epoch,genesisTimestamp):Date|null
Defined in: packages/synapse-core/src/utils/epoch.ts:16
Convert a Filecoin epoch to a JavaScript Date
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
epoch |
bigint |
The epoch to convert |
genesisTimestamp |
number |
The genesis timestamp of the chain in seconds (Unix timestamp) |
Returns
Section titled “Returns”Date | null
Date of the epoch, or null when it is past the Date range
(e.g. the maxUint256 “never” sentinel used by runwayInEpochs)