Adding a UCUM 'mo' or 'a' to a Date or DateTime returns a value instead of an error
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
- Área
- backend
Línea de trabajo
The bug is in how cql-execution adds and subtracts definite-duration UCUM units ('mo', 'a') to Date and DateTime values; the spec requires an error there while 'wk' is allowed. Start by finding the date/time Add and Subtract implementations in the library's source and the Quantity-to-duration conversion they call, then reproduce the three table rows in a small script. Done when the 'mo' and 'a' cases throw an error and 'wk' still returns the expected date, with tests covering both.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Add for date and time values (1.5.3 and 2.0):
However, to avoid the potential confusion of calendar-based date and time arithmetic with definite-duration date and time arithmetic, it is an error to attempt to add a definite-duration time-valued unit above days (and weeks), a calendar duration must be used.
UCUM 'mo' and 'a' are definite-duration units. The calendar units are month and year. Subtract says the same.
| Expression | cql-execution | Spec | Java engine 5.8.0 |
|---|---|---|---|
@2014-01-01 + 1 'mo' |
@2014-02-01 |
error | error |
@2014-01-01T10:00 + 1 'a' |
@2015-01-01T10:00 |
error | error |
@2014-01-01 + 1 'wk' |
@2014-01-08 |
@2014-01-08 (allowed) |
Environment
cql-execution master e8096c6, through test-server (the build has two unrelated Quantity modulo commits on top). The Java engine column is HAPI FHIR 9.0.0 with clinical-reasoning 4.17.0, through $cql.
- Lenguaje dominante
- JavaScript
- Estrellas
- 86
- Forks
- 40
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cqframework/cql-execution
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
cqframework/cql-execution#410 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
cqframework/cql-execution#407 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
cqframework/cql-execution#406 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
cqframework/cql-execution#414 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
cqframework/cql-execution#413 ·
Todos los issues de cqframework/cql-execution
Issues similares
-
Mend: dependency security vulnerability
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
ManageIQ/manageiq-ui-service#2259 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
electerious/Ackee#411 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
[bug] 提瓦特记事本原石检测框宽度较窄Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
babalae/bettergi-scripts-list#3905 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug] "Configure Colota" opens Colota with "Invalid configuration: No configuration data in URL"Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 87/100
dedicatedcode/reitti#1445 ·
Los mantenedores suelen responder en 1 día