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