Skip to content

chopZonedMilliseconds

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

Returns the zoned datetime string rounded/truncated to second precision.

  • Removes millisecond precision.
  • Returns "" for invalid input.
ParameterTypeDescription
valuestringISO 8601 zoned datetime string

Zoned datetime string without milliseconds or "" for invalid

import { chopZonedMilliseconds } from "@northguild/gmt/zoned/chop";
chopZonedMilliseconds("2024-02-29T14:30:45.123+00:00[Europe/London]") // "2024-02-29T14:30:45+00:00[Europe/London]"
output 

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