parseDateTimeFromZoned
Signature
Section titled “Signature”parseDateTimeFromZoned(value: string): stringParse a zoned datetime and return the plain local datetime portion as an ISO plain datetime string.
- Uses Temporal.ZonedDateTime.from to parse.
- Rejects leap seconds.
- Returns "" for invalid input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | string | zoned ISO 8601 datetime string |
Returns
Section titled “Returns”plain local datetime string or "" when invalid
Examples
Section titled “Examples”import { parseDateTimeFromZoned } from "@northguild/gmt/zoned/parse";
parseDateTimeFromZoned("2024-02-29T12:34:56.789+00:00[UTC]") // "2024-02-29T12:34:56.789"