← daytomonth operator page · time/daytomonth/sc/months_of_thirty_days
pandas ✅ · DuckDB ✅
daytomonth(SC_1) with SC_1 = 134, the page's Example 3.
Number days to duration: daytomonth (134); "returns P4M14D"; daytomonth "returns a duration having the following mask", \PM\MDD\D, "the corresponding number of months and days; according to ISO 8601 M = 30D".
DS_r = P4M14D, a String: 134 = 4 × 30 + 14.
#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 := daytomonth(SC_1);
| SC_1 |
|---|
| 134 |
{
"scalars": [
{"name": "SC_1", "type": "Integer"}
]
}
{
"scalars": [
{"name": "DS_r", "type": "String", "value": "P4M14D"}
]
}