parseMonthFromZoned
Signature
Section titled “Signature”parseMonthFromZoned(value: string): stringimport { parseMonthFromZoned } from "@northguild/gmt/zoned/parse";Return the month (1-12) from a zoned datetime string.
- Returns zero-padded string for month.
- Returns “” for invalid input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value |
string |
ISO zoned datetime string (e.g., “2024-03-15T14:30:45.123+00:00[UTC]”) |
Returns
Section titled “Returns”Month (01-12) or “” on invalid input
Examples
Section titled “Examples”parseMonthFromZoned("2024-03-15T14:30:45+00:00[UTC]") // "03"parseMonthFromZoned("invalid") // ""