fromSeconds
Creates a Date from a timestamp in seconds.
Use this when receiving a timestamp from a backend that sends seconds
(e.g. Java Instant.getEpochSecond()). No heuristic — the input is
always treated as seconds.
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
seconds | number | Seconds since the Unix epoch |
Returns
Section titled “Returns”Date | null — A valid Date, or null for NaN / non-finite input
