Skip to content

chopZonedTime

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

Extracts the local date portion from an ISO 8601 zoned datetime string.

  • Extracts date components (year, month, day) from a ZonedDateTime.
  • Returns "" for invalid input.
ParameterTypeDescription
valuestringISO 8601 zoned datetime string

Local date string YYYY-MM-DD or "" for invalid

import { chopZonedTime } from "@northguild/gmt/zoned/chop";
chopZonedTime("2024-02-29T14:30:45.123-03:00[America/Sao_Paulo]") // "2024-02-29"
output 

zoned/chop/chopZonedTime.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.