MeridianMERIDIAN

Calendar Quarter

datetime.period.quarter

Calendar quarter notation (Q1-Q4 with year). Ubiquitous in SEC filings, earnings data, and business intelligence dashboards. Represents a 3-month range. Transforms to first day of the quarter.

Worked samples

DuckDB 1.5.5 · finetype 0.6.64

ValueAs DATEquarteryear
Q1 20242024-01-0112024
Q4 20232023-10-0142023
2024-Q22024-04-0122024
2023 Q32023-07-0132023

Shape

Pattern
^(Q[1-4]\s?\d{4}|\d{4}[\s-]?Q[1-4])$
ValueLengthShape
Q1 20247matches
Q4 20237matches
2024-Q27matches
2023 Q37matches
Q1 2026rejected: one character short

Background

Origin

The calendar year can be divided into four quarters, often abbreviated as Q1, Q2, Q3 and Q4.[1] In the Gregorian calendar, the first quarter runs from January to March and the fourth from October to December.[1] Some fields instead use quarters of exactly 13 weeks each, often following ISO week date conventions.[1]

SDMX bases its list of valid time representations on the ISO-8601 standard.[2] SDMX writes a quarterly period in the format YYYY-Qn, with 2010-Q1 as its example.[2] The Library of Congress's Extended Date/Time Format (EDTF) codes the four quarters as the numbers 33 to 36.[3] In EDTF, 2001-34 denotes the second quarter of 2001.[3] EDTF's Levels 1 and 2 specify features described in ISO 8601-2.[3]

Use

The SEC's EDGAR frames API writes quarterly periods in the form CY####Q#, for data with a duration of 91 days plus or minus 30 days.[4] A label like Q1 2024 names a span of three months, not a day, so decide whether you want its first day, its last day or the period itself before you cast it. (Meridian's view)

The fiscal year of the United States federal government begins on 1 October.[5] The Australian financial year's first quarter runs from 1 July to 30 September.[5] In pandas, a Period with the quarterly frequency Q-JUL, year 2006 and quarter 1 formats as 2006-Q1 while its last month is October 2005.[6] Before mapping Q1 to January, check whether the source reports calendar or fiscal quarters, because the same label can point at a different three months. (Meridian's view)

pandas accepts a quarter-first string such as 4Q2005 as a Period value.[7] pandas' strftime directive %q gives the quarter as a decimal number from 1 to 4.[6] DuckDB's quarter date part returns the quarter of the year as a number from 1 to 4.[8]

Where you'll meet it

The Office for National Statistics' GDP time series ABMI labels its quarterly figures in the form 2026 Q1.[9]

Detection notes

New in format coverage expansion. Accepts both "Q1 2024" and "2024-Q1" variants. Transform extracts year and quarter, constructs first day of quarter.

Use it

CLI · DuckDB
$ finetype infer -i "Q1 2024" --mode column
→ datetime.period.quarter

SELECT ft_infer('Q1 2024');
-- → 'datetime.period.quarter'
Cast expression
make_date(CAST(regexp_extract({col}, '(\d{4})', 1) AS INT), (CAST(regexp_extract({col}, 'Q([1-4])', 1) AS INT) - 1) * 3 + 1, 1)

Schema

https://meridian.online/schemas/datetime.period.quarter · Frictionless type string

finetype taxonomy datetime.period.quarter -o json-schema

Aliases

quarter_iso

Type Registry