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

Backport: Picture string with ordinal not parsed correctly #310

Open
uw4 opened this issue May 28, 2024 · 0 comments
Open

Backport: Picture string with ordinal not parsed correctly #310

uw4 opened this issue May 28, 2024 · 0 comments

Comments

@uw4
Copy link
Contributor

uw4 commented May 28, 2024

A user of the jsonata-java lib (see #275) fixed this issue in $toMillis (a logic error):
dashjoin/jsonata-java#42

The original (one line) fix is in this pull request dashjoin/jsonata-java#41
and the test case is here https://github.com/dashjoin/jsonata-java/blob/5ba7416e1dd822444e2fa50fea3fe32453a9acf3/src/test/java/com/dashjoin/jsonata/DateTimeTest.java

As we are based on the same impl DateTimeUtils.analyseDateTimePicture is also affected.

Original issue:

Expression:

$toMillis('2018th', '[Y0001;o]')

Expected output

1514764800000

Actual output

index out of bounds exception

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

No branches or pull requests

1 participant