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

normalizeDate examples #194

Open
namedgraph opened this issue Apr 28, 2023 · 1 comment
Open

normalizeDate examples #194

namedgraph opened this issue Apr 28, 2023 · 1 comment

Comments

@namedgraph
Copy link

Issue type: ❓ Question

I came across the normalizeDate function but cannot find any examples on how to use it. If I have $(date) values such as 2014 and 2014-05, can it be used parse them both as YYYY-MM-DD and make them a valid xsd:date values?

@bjdmeest
Copy link
Collaborator

bjdmeest commented May 2, 2023

The tests of the JAVA code are at https://github.com/FnOio/idlab-functions-java/blob/main/src/test/java/be/ugent/knows/idlabFunctions/IDLabFunctionsTest.java#L170 and there are some RML tests at https://github.com/RMLio/rmlmapper-java/blob/15c9c02c78aa743df02f7e773c2b1a229c3bc377/src/test/resources/rml-fno-test-cases/RMLFNOTCF009/mapping.ttl#L33, but no YARRRML tests indeed. This function currently only supports 'complete dates', as there's some ambiguity on how to solve this for partial dates: how would you expect 2014 to be parsed? as "2014"^^xsd:gYear or eg as "2014-01-01"^^xsd:date?

(I'm not really sure how to handle functions that can return different datatypes in the rest of the mapper, but that's complementary to this issue)

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

2 participants