-
Type:
Change Request
-
Resolution: Persuasive with Modification
-
Priority:
Medium
-
Clinical Quality Language (FHIR)
-
1.5 [deprecated]
-
Clinical Decision Support
-
Authors Guide
-
5.4.4. Date and Time Arithmetic
-
-
Chris Moesel/Jen Seeman: 17-0-5
-
Correction
-
Non-substantive
The spec states the following in regard to year arithmetic:
If the month and day of the date or time value is not a valid date in the resulting year, the last day of the calendar month is used.
It says a similar thing for month arithmetic.
This goes against every implementation I've ever seen. Usually, something like "2020-02-29 + 1 year" results in the first day of the next month (e.g., "2021-03-01"). Similarly, "2019-01-29 + 1 month" would usually result in "2019-03-01". For example, I did this in Node.js (javascript) replicator:
> var Feb29 = new Date(2020, 1, 29) // NOTE: 0-based month index undefined > Feb29 2020-02-29T05:00:00.000Z > Feb29.setFullYear(2021) 1614574800000 > Feb29 2021-03-01T05:00:00.000Z
Is the approach described in the CQL spec really what ISO8601 says to do?
- is voted on by
-
BALLOT-12725 Negative - Chris Moesel : 2020-May-CQLANG R1 Normative
- Balloted