convertZonedToPlainDateTime
Signature
Section titled “Signature”convertZonedToPlainDateTime(value: string): stringimport { convertZonedToPlainDateTime } from "@northguild/gmt/zoned/convert";Convert a zoned ISO 8601 datetime string to a plain datetime string.
- Extracts the local date-time components without timezone info.
- Validation is performed on the input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value |
string |
zoned ISO 8601 datetime string |
Returns
Section titled “Returns”plain datetime string or “” on invalid input
Examples
Section titled “Examples”convertZonedToPlainDateTime("2024-02-29T14:30:45.123-05:00[America/New_York]") // "2024-02-29T14:30:45.123"convertZonedToPlainDateTime("invalid") // ""