UNPKG

@burglekitt/gmt

Version:

Temporal-based date and time utilities with timezone support and polyfill integration

14 lines (13 loc) 552 B
/** * Return the start of the quarter for a given UTC datetime string. * * - Calculates quarter start month: Q1=1, Q2=4, Q3=7, Q4=10. * - Returns "" for invalid input. * * @param value ISO UTC datetime string (e.g. "2024-03-15T12:00:00Z") * @returns ISO UTC datetime string representing the start of the quarter, or "" on invalid input * * @example startOfQuarterForUtc("2024-03-15T12:00:00Z") // "2024-01-01T00:00:00Z" * @example startOfQuarterForUtc("invalid") // "" */ export declare function startOfQuarterForUtc(value: string): string;