parseMicrosecondFromUnix
Signature
Section titled “Signature”parseMicrosecondFromUnix(value: string | number, options?: { epochUnit?: UnixUnit; timeZone?: string; }): stringimport { parseMicrosecondFromUnix } from "@northguild/gmt/unix/parse";Return the microsecond (0-999) from a unix epoch value.
- Delegates to {@link parseUnitFromUnix} with unit “microsecond”.
- Returns “” for invalid input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value |
string | number |
unix epoch in milliseconds or seconds (number or string) |
Options
Section titled “Options”options
| Option | Type | Default |
|---|---|---|
epochUnit? |
UnixUnit |
— |
timeZone? |
string |
— |
Returns
Section titled “Returns”Microsecond (000-999) or “” on invalid input
Related types
Section titled “Related types”Examples
Section titled “Examples”parseMicrosecondFromUnix(1700000000000) // "000"parseMicrosecondFromUnix(-86400, { epochUnit: "seconds" }) // "000"