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

finish date() spec #289

Open
MartijnR opened this issue Oct 20, 2021 · 1 comment
Open

finish date() spec #289

MartijnR opened this issue Oct 20, 2021 · 1 comment

Comments

@MartijnR
Copy link
Contributor

The date spec is currently unfinished. It says:

Converts to a string in the ….date format.

I'd like to propose to add a time and local timezone offset (to the ODK spec), i.e. to treat it as a dateTime. This seems to fall within the possibilities of the spec for "date" that we refer to in the ODK spec: https://www.w3.org/TR/xmlschema-2/#date

So date(12345.5) would be turned into e.g. 2003-10-20T08:00:00.000-04:00.

One use case that has come up is:

a. converting a date with decimal-date-time()
b. do some stuff with the result of a, e.g. add 1 (day)
c. convert back the result of b using date() and get a predicable result (e.g. 1 day later).

@MartijnR
Copy link
Contributor Author

Considering the current behavior in ODK Collect and the fact that this proposal would output like Enketo's recent behavior in the previous XPath evaluator, I didn't create a forum post. If you prefer to discuss there, I'd be happy to post it there.

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