Skip to content

parseDateTimeFromZoned

  • The core functions, which every industry uses.
parseDateTimeFromZoned(value: string): string

Parse 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.
ParameterTypeDescription
valuestringzoned ISO 8601 datetime string

plain local datetime string or "" when invalid

import { parseDateTimeFromZoned } from "@northguild/gmt/zoned/parse";
parseDateTimeFromZoned("2024-02-29T12:34:56.789+00:00[UTC]") // "2024-02-29T12:34:56.789"
output 

zoned/parse/parseDateTimeFromZoned.ts

Accessibility
© 2026 NorthGuild · Licences

Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.