# Calendar Quarter

Key: `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.

Page: <https://meridian.online/docs/projects/finetype/types/datetime/period/quarter>

Samples: `Q1 2024`, `Q4 2023`, `2024-Q2`, `2023 Q3`

## Background

### Origin

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

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

### 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]](https://www.sec.gov/search-filings/edgar-application-programming-interfaces) 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]](https://en.wikipedia.org/wiki/Fiscal_year) The Australian financial year's first quarter runs from 1 July to 30 September.[[5]](https://en.wikipedia.org/wiki/Fiscal_year) 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]](https://pandas.pydata.org/docs/reference/api/pandas.Period.strftime.html) 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]](https://pandas.pydata.org/docs/reference/api/pandas.Period.html) pandas' strftime directive %q gives the quarter as a decimal number from 1 to 4.[[6]](https://pandas.pydata.org/docs/reference/api/pandas.Period.strftime.html) DuckDB's quarter date part returns the quarter of the year as a number from 1 to 4.[[8]](https://duckdb.org/docs/current/sql/functions/datepart.html)

### Where you'll meet it

The Office for National Statistics' GDP time series ABMI labels its quarterly figures in the form 2026 Q1.[[9]](https://www.ons.gov.uk/generator?format=csv&uri=/economy/grossdomesticproductgdp/timeseries/abmi/qna)

## Sources

1. [Calendar year](https://en.wikipedia.org/wiki/Calendar_year) — secondary source
2. [SDMX Time Formats](https://fmrwiki.sdmx.io/12.1.1/information-model/glossary/SdmxTimeFormats/) — documentation
3. [Extended Date Time Format (EDTF) Specification (Library of Congress)](https://www.loc.gov/standards/datetime/) — documentation
4. [SEC.gov \| EDGAR Application Programming Interfaces (APIs)](https://www.sec.gov/search-filings/edgar-application-programming-interfaces) — documentation
5. [Fiscal year](https://en.wikipedia.org/wiki/Fiscal_year) — secondary source
6. [pandas.Period.strftime — pandas 3.0.6 documentation](https://pandas.pydata.org/docs/reference/api/pandas.Period.strftime.html) — documentation
7. [pandas.Period — pandas 3.0.6 documentation](https://pandas.pydata.org/docs/reference/api/pandas.Period.html) — documentation
8. [Date Part Functions](https://duckdb.org/docs/current/sql/functions/datepart.html) — documentation
9. [Gross Domestic Product: chained volume measures: Seasonally adjusted £m](https://www.ons.gov.uk/generator?format=csv&uri=/economy/grossdomesticproductgdp/timeseries/abmi/qna) — dataset
