← period_indicator operator page · time/period_indicator/sc/quarterly_period

Quarterly period 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

period_indicator(SC_1) on a scalar time_period, SC_1 = 2010Q1, an input scalar, as VTL has no time_period literal.

Manual:

Period indicator: "period_indicator returns the period indicator of a time_period value. The period indicator is the part of the time_period value which denotes the duration of the time period (e.g. day, week, month...)."

Expected:

DS_r = Q, a Duration: the manual's default conversion from string to time_period (Type conversion) reads 2010Q1 as the first quarter of 2010.

script.vtl ⇩

DS_r := period_indicator(SC_1);

input/scalars.csv ⇩

SC_1
2010Q1

input/scalars.json ⇩

{
  "scalars": [
    {"name": "SC_1", "type": "Time_Period"}
  ]
}

expected/scalars.json ⇩

{
  "scalars": [
    {"name": "DS_r", "type": "Duration", "value": "Q"}
  ]
}