API reference
startOfQuarter
API index · Input types and conventions · Installation
startOfQuarter(value) → same kind
Find the first date of the containing ISO quarter (January, April, July, or October). Also accepts PlainYearMonth and returns its quarter's first month without adding day precision.
import { startOfQuarter } from '@frantss/temporal-fns';
startOfQuarter(Temporal.PlainDate.from('2026-05-17')).toString(); // => '2026-04-01'
startOfQuarter(Temporal.PlainYearMonth.from('2026-12')).toString(); // => '2026-10'
startOfQuarter(Temporal.PlainDateTime.from('2026-12-31T23:59')).toString(); // => '2026-10-01T00:00:00'Related: endOfQuarter, getQuarter, isSameQuarter.
Behaviors: BND-001: Plain date boundaries return complete dates; BND-002: Plain date-time boundaries retain nanosecond endpoint precision; BND-005: Year-month boundaries return months rather than invent days.