chopZonedDate
Signature
Section titled “Signature”chopZonedDate(value: string): stringimport { chopZonedDate } from "@northguild/gmt/zoned/chop";Extracts the local time portion from an ISO 8601 zoned datetime string.
- Extracts time components (hour, minute, second, subsecond) from a ZonedDateTime.
- Returns “” for invalid input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value |
string |
ISO 8601 zoned datetime string |
Returns
Section titled “Returns”The local time portion as HH:MM:SS(.SSS) or “” for invalid
Examples
Section titled “Examples”chopZonedDate("2024-02-29T14:30:45.123-05:00[America/New_York]") // "14:30:45.123"chopZonedDate("invalid") // ""