Skip to content

startOfQuarterForUtc

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

Return the start of the quarter for a given UTC datetime string.

  • Calculates quarter start month: Q1=1, Q2=4, Q3=7, Q4=10.
  • Resets every time field, including milliseconds, microseconds and nanoseconds.
  • Returns "" for invalid input.
ParameterTypeDescription
valuestringISO UTC datetime string (e.g. “2024-03-15T12:00:00Z”)

ISO UTC datetime string representing the start of the quarter, or "" on invalid input

import { startOfQuarterForUtc } from "@northguild/gmt/utc/calculate";
startOfQuarterForUtc("2024-03-15T12:00:00Z") // "2024-01-01T00:00:00Z"
output 

utc/calculate/startOfQuarterForUtc.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.