dayTimeDuration, duration, yearMonthDuration missing constructors using each other
mstevan opened this issue · 0 comments
@mstevan
test-set: prod/CastExpr.xml
test-cases: K-SeqExprCast-165 to 168,189 to 192, 208 to 211
@team
It seems that we have constructor only taking string as constructor. But according to test cases, it should be possible to also take dayTimeDuration as constructor argument for duration and vice versa. Same stands for yearMonthDuration
Input:
string(duration(dayTimeDuration("P31DT3H2M10.001S"))) eq "P31DT3H2M10.001S"
string(dayTimeDuration(duration("P3Y0M31DT3H2M10.001S"))) eq "P31DT3H2M10.001S"
string(yearMonthDuration(duration("P3Y0M31DT3H2M10.001S"))) eq "P3Y
Output:
Code: [XPTY0004] (this code can be looked up in the documentation and specifications).
Location information: file:/Users/mstevan/Documents/:LINE:1:COLUMN:16:
Invalid argument for function duration. dayTimeDuration cannot be promoted to type string?.
Expected output:
true