Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dayTimeDuration, duration, yearMonthDuration missing constructors using each other #882

Open
mstevan opened this issue Jan 2, 2021 · 0 comments
Labels

Comments

@mstevan
Copy link
Contributor

mstevan commented Jan 2, 2021

@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:
⚠️ ️There was an error.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants