getodk / getodk/xforms-spec

finish date() spec

Open
#289 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
34
Forks
28
Avg merge
27m
Merged PRs (30d)
1

Description

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).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the unfinished date() wording in the ODK specification and read the referenced W3C XML Schema date definition. Resolve whether date() should include a time and local timezone offset, define the expected decimal-date-time conversion behavior, and update the specification with an unambiguous example.

Written by the indexing model from the issue text.

Assessment

Tech stack
xml
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.