Time operators

🟢 17 of 17 operators all ok · vtlengine 1.10.0rc3 (9e1c81a6) · pandas 2.3.3 · DuckDB 1.5.5
🟢 all ok🟡 partially implemented🛡️ refused with an error🔴 not implemented or crash🔵 engines differ ✅ match · ❌ wrong result · 🛡 guarded error (code) · 💥 crash · 📌 team decision
        ---
config:
  flowchart:
    useMaxWidth: false

---
flowchart LR
    classDef ok fill:#d4edda,stroke:#28a745,color:#000
    classDef partial fill:#fff3cd,stroke:#ffc107,color:#000
    classDef refused fill:#d4edda,stroke:#28a745,stroke-width:3px,stroke-dasharray: 2 2,color:#000
    classDef missing fill:#f8d7da,stroke:#dc3545,color:#000
    classDef diverge fill:#cce5ff,stroke:#007bff,color:#000
    classDef block fill:#2b3a4a,stroke:#2b3a4a,color:#fff,font-weight:bold
    classDef ext fill:#fff,stroke:#666,color:#000,stroke-dasharray: 5 5
    B["Time operators"]:::block
    time__period_indicator["Period indicator · period_indicator<br/>🟢4"]:::ok
    time__fill_time_series["Fill time series · fill_time_series<br/>🟢8"]:::ok
    time__flow_to_stock["Flow to stock · flow_to_stock<br/>🟢3"]:::ok
    time__stock_to_flow["Stock to flow · stock_to_flow<br/>🟢3"]:::ok
    time__timeshift["Time shift · timeshift<br/>🟢3"]:::ok
    time__time_agg["Time aggregation · time_agg<br/>🟢8"]:::ok
    time__current_date["Actual time · current_date<br/>🟢1"]:::ok
    time__datediff["Days between two dates · datediff<br/>🟢4"]:::ok
    time__dateadd["Add time unit to date · dateadd<br/>🟢4"]:::ok
    time__getyear["Extract the year · getyear<br/>🟢2"]:::ok
    time__getmonth["Extract the month · getmonth<br/>🟢2"]:::ok
    time__dayofmonth["Extract the day of the month · dayofmonth<br/>🟢2"]:::ok
    time__dayofyear["Extract the day of the year · dayofyear<br/>🟢2"]:::ok
    time__daytoyear["Number of days to years and days · daytoyear 📌<br/>🟢2"]:::ok
    time__daytomonth["Number of days to months and days · daytomonth 📌<br/>🟢2"]:::ok
    time__yeartoday["Years and days to number of days · yeartoday 📌<br/>🟢2"]:::ok
    time__monthtoday["Months and days to number of days · monthtoday 📌<br/>🟢2"]:::ok
    time__period_indicator --- B
    time__fill_time_series --- B
    time__flow_to_stock --- B
    time__stock_to_flow --- B
    time__timeshift --- B
    time__time_agg --- B
    time__current_date --- B
    time__datediff --- B
    time__dateadd --- B
    B --- time__getyear
    B --- time__getmonth
    B --- time__dayofmonth
    B --- time__dayofyear
    B --- time__daytoyear
    B --- time__daytomonth
    B --- time__yeartoday
    B --- time__monthtoday
    click time__period_indicator href "period_indicator.html"
    click time__fill_time_series href "fill_time_series.html"
    click time__flow_to_stock href "flow_to_stock.html"
    click time__stock_to_flow href "stock_to_flow.html"
    click time__timeshift href "timeshift.html"
    click time__time_agg href "time_agg.html"
    click time__current_date href "current_date.html"
    click time__datediff href "datediff.html"
    click time__dateadd href "dateadd.html"
    click time__getyear href "getyear.html"
    click time__getmonth href "getmonth.html"
    click time__dayofmonth href "dayofmonth.html"
    click time__dayofyear href "dayofyear.html"
    click time__daytoyear href "daytoyear.html"
    click time__daytomonth href "daytomonth.html"
    click time__yeartoday href "yeartoday.html"
    click time__monthtoday href "monthtoday.html"
    

Operators

Operator

Status

Forms

Period indicator period_indicator

🟢

4

Fill time series fill_time_series

🟢

8

Flow to stock flow_to_stock

🟢

3

Stock to flow stock_to_flow

🟢

3

Time shift timeshift

🟢

3

Time aggregation time_agg

🟢

8

Actual time current_date

🟢

1

Days between two dates datediff

🟢

4

Add time unit to date dateadd

🟢

4

Extract the year getyear

🟢

2

Extract the month getmonth

🟢

2

Extract the day of the month dayofmonth

🟢

2

Extract the day of the year dayofyear

🟢

2

Number of days to years and days daytoyear

🟢

2

Number of days to months and days daytomonth

🟢

2

Years and days to number of days yeartoday

🟢

2

Months and days to number of days monthtoday

🟢

2

Types

Operator

number

integer

time

date

time_period

duration

any type

Period indicator

in

out

Fill time series

in · out

in · out

in · out

out

Flow to stock

in · out

in · out

in · out

in · out

Stock to flow

in · out

in · out

in · out

in · out

Time shift

in

in · out

in · out

in · out

out

Time aggregation

in · out

in · out

in · out

in

Actual time

out

Days between two dates

out

in

in

Add time unit to date

in

in · out

in · out

in

in

out

Extract the year

out

in

in

Extract the month

out

in

in

Extract the day of the month

out

in

in

Extract the day of the year

out

in

in

Number of days to years and days

in

out

Number of days to months and days

in

out

Years and days to number of days

out

in

Months and days to number of days

out

in

Forms that are not green

Every form is 🟢 or 🛡️.