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

fr:datetime fails to parse date in some cases #4029

Closed
ebruchez opened this issue Apr 17, 2019 · 0 comments

Comments

Projects
1 participant
@ebruchez
Copy link
Collaborator

commented Apr 17, 2019

We have the following:

<xf:setvalue ref="$local-date" value="substring(string(xs:date($binding)), 1, 10)"/>
<xf:setvalue ref="$local-time" value="substring(string(xs:time($binding)), 1, 8)"/>

We get the following error:

Invalid date "2019-04-03T11:28:25" (Day must be two digits)                                                           

I am not sure whether it happens all the time, but it definitely happens in this case of a customer form. The implementation in Saxon in CastExpression fails to perform the cast.

Changing the code to:

<xf:setvalue ref="$local-date" value="substring($value, 1, 10)"/>
<xf:setvalue ref="$local-time" value="substring($value, 12, 8)"/>

addresses the issue.

+1 from customer

@ebruchez ebruchez self-assigned this Apr 17, 2019

@ebruchez ebruchez added this to To do in Orbeon Forms 2018.2.3 via automation Apr 17, 2019

@ebruchez ebruchez added this to To review in Orbeon Forms 2019.1 via automation Apr 17, 2019

@ebruchez ebruchez closed this in 52c4900 Apr 17, 2019

Orbeon Forms 2019.1 automation moved this from To review to Done Apr 17, 2019

Orbeon Forms 2018.2.3 automation moved this from To do to Done Apr 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.