Skip to content

chopTime

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

Return the PlainDate portion extracted from an ISO PlainDateTime string.

  • Extracts date components from a PlainDateTime.
  • Returns "" for invalid input.
ParameterTypeDescription
valuestringISO PlainDateTime string

ISO PlainDate string or "" on invalid input

import { chopTime } from "@northguild/gmt/plain/chop";
chopTime("2024-02-29T12:34:56") // "2024-02-29"
output 

plain/chop/chopTime.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.