foundation-utils.formattimestamp
Home > @genesislcap/foundation-utils > formatTimestamp
formatTimestamp() function
Formats [DATE|DATETIME] Unix Timestamps to readable strings
Signature:
export declare function formatTimestamp(timestamp: number, withTime: boolean): string;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
timestamp |
number |
The UNIX Timestamp. |
|
withTime |
boolean |
The flag to determine if formatted value should contain 'time' info. |
Returns:
string