Adding a UCUM 'mo' or 'a' to a Date or DateTime returns a value instead of an error
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- backend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 86
- Fork
- 40
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cqframework/cql-execution
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
cqframework/cql-execution#410 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
cqframework/cql-execution#407 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
cqframework/cql-execution#406 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
cqframework/cql-execution#414 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
cqframework/cql-execution#413 ·
Tất cả issue của cqframework/cql-execution
Issue tương tự
-
Mend: dependency security vulnerability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
ManageIQ/manageiq-ui-service#2259 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
sagemathinc/sagebrush-agent#230 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
electerious/Ackee#411 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[bug] 提瓦特记事本原石检测框宽度较窄Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
babalae/bettergi-scripts-list#3905 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày