← yeartoday operator page · time/yeartoday/sc/one_year_and_twenty_days
pandas ✅ · DuckDB ✅
yeartoday(SC_1) with SC_1 = P1Y20D, a String, the page's Example 2.
Duration to number days: yeartoday (P1Y20D); "returns 385", "according to ISO 8601 Y = 365D".
DS_r = 385, an Integer: 365 + 20.
#394: a Duration holds only a period indicator (A, S, Q, M, W, D), so the ISO 8601 durations that daytoyear and daytomonth return and yeartoday and monthtoday take are Strings.
DS_r := yeartoday(SC_1);
| SC_1 |
|---|
| P1Y20D |
{
"scalars": [
{"name": "SC_1", "type": "String"}
]
}
{
"scalars": [
{"name": "DS_r", "type": "Integer", "value": 385}
]
}