Dates with and without Time #6
-
Each Event has startDate and EndDate. However, the datatype can be xsd:dateTime or xsd:date. This works with JSON-LD but is not very JSON friendly. I propose the following mapping:
The goal here is to return valid data. The only other option I can think of is to always return startDateTime (xsd:dateTime) even when the time is not specified and pad the time using midnight or 23:59 or something similar that is hard-coded and agreed upon with the developers. Question: which convention do you prefer
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
@christianroy FYI I updated this discussion text. |
Beta Was this translation helpful? Give feedback.
-
see issue #14 |
Beta Was this translation helpful? Give feedback.
-
When both date and time are known (2023-11-01T20:00:00-04:00) --> use the property startDateTime and endDateTime When only the date is known (2023-11-01) --> use the property startDate or endDate |
Beta Was this translation helpful? Give feedback.
When both date and time are known (2023-11-01T20:00:00-04:00) --> use the property startDateTime and endDateTime
When only the date is known (2023-11-01) --> use the property startDate or endDate