Skip to content

startOfQuarterForDate

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

Return the first day of the quarter for a given ISO date.

  • Returns the first day (month and day set to 1) of the quarter containing the input date.
  • Q1 returns “01-01”, Q2 returns “04-01”, Q3 returns “07-01”, Q4 returns “10-01”.
  • Validates input using isValidDate.
ParameterTypeDescription
valuestringISO PlainDate string

ISO PlainDate string for the first day of the quarter, or "" on invalid input

import { startOfQuarterForDate } from "@northguild/gmt/plain/calculate";
startOfQuarterForDate("2024-03-15") // "2024-01-01"
output 

plain/calculate/startOfQuarterForDate.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.