MeridianMERIDIAN

Calendar 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.

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.

Domain
datetime
Category
period
Casts to
DATE
Scope
Universal

Try it

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

DuckDB

Detect
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)
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(ft_cast(my_column) AS DATE) AS clean_value
FROM my_table
WHERE ft_infer(my_column) = 'datetime.period.quarter';

Struct Expansion

Expression
quarter: CAST(regexp_extract({col}, 'Q([1-4])', 1) AS INT)
year: CAST(regexp_extract({col}, '(\d{4})', 1) AS INT)

JSON Schema

finetype taxonomy datetime.period.quarter -o json-schema
{
  "$id": "https://meridian.online/schemas/datetime.period.quarter",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "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.",
  "examples": [
    "Q1 2024",
    "Q4 2023",
    "2024-Q2",
    "2023 Q3"
  ],
  "pattern": "^(Q[1-4]\\s?\\d{4}|\\d{4}[\\s-]?Q[1-4])$",
  "title": "Calendar Quarter",
  "type": "string",
  "x-finetype-label": "datetime.period.quarter",
  "x-finetype-pii": false
}

Examples

Q1 2024Q4 20232024-Q22023 Q3

Aliases

quarter_iso

Type Registry