parseDayFromUnix
Signature
Section titled “Signature”parseDayFromUnix(value: string | number, options?: { epochUnit?: UnixUnit; timeZone?: string; }): stringimport { parseDayFromUnix } from "@northguild/gmt/unix/parse";Return the day of month (1-31) from a unix epoch value.
- Delegates to {@link parseUnitFromUnix} with unit “day”.
- 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”Day (01-31) or “” on invalid input
Related types
Section titled “Related types”Examples
Section titled “Examples”parseDayFromUnix(1700000000000) // "15"parseDayFromUnix(-86400, { epochUnit: "seconds" }) // "31"