cqframework / cqframework/cql-tests-runner

DateTime operators testing error breakdown (CqlDateTimeOperatorsTest)

Open
#60 0 comments 0 reactions 1 assignee View on GitHub

@bryantaustin13 is already working on this.

Since Jan 8, 2026.

Dominant language
TypeScript
Stars
5
Forks
3
Avg merge
2d 16h
Merged PRs (30d)
2

Description

CqlDateTimeOperatorsTest fails commentary:

  1. "passCount": 274,
    "skipCount": 5,
    "failCount": 38,
    "errorCount": 0

  2. Failing tests:
    A.
    DateTimeAddYearInWeeks Engine evaluates DateTime(2018, 5, 23) + 52 weeks to be "@2019-05-23T". It should evaluate to "@2019-05-22T"
    52 weeks = 364 days
    Adding 364 days to 2018-05-23 (2018 is not a leap year) lands one day before the same calendar date the next year
    See https://github.com/cqframework/clinical-reasoning/issues/883#issue-3793517124.

    These fail the same way
    DateTimeLeapDayAddYearInWeeks
    DateTimeLeapYearAddYearInWeeks
    DateTimeSubtractYearInWeeks
    DateTimeLeapDaySubtractYearInWeeks
    DateTimeLeapYearSubtractYearInWeeks

B.
(interval differences)
DateTimeDurationBetweenUncertainInterval
DateTimeDurationBetweenUncertainInterval2
DateTimeDurationBetweenUncertainAdd
DateTimeDurationBetweenUncertainSubtract
DateTimeDurationBetweenUncertainMultiply

(Z in actual not in expected)
    DateTimeAdd5HoursWithLeftMinPrecisionSecond     
    DateTimeAdd5Seconds
    DateTimeAddSecondsOverflow
    DateTimeAdd5Milliseconds
    DateTimeAddMillisecondsOverflow
    DateTimeSecond
    DateTimeMillisecond
    DateTime1
    DateTime2
    DateTimeSubtract5Seconds
    DateTimeSubtract15HourPrecisionSecond
    DateTimeSubtractSecondsUnderflow
    DateTimeSubtract5Milliseconds
    DateTimeSubtractMillisecondsUnderflow

(actual === 1 vs 0)
    DurationInDaysA                                 
    DurationInDaysAA

(differing times)
    DateTimeAdd5Hours                   (actual missing 10 in time)
    DateTimeAddHoursOverflow            (actual missing 00 in time)
    DateTimeAdd5Minutes                 (actual missing 05:10 in time)
    DateTimeAddMinutesOverflow          (actual missing 06:00 in time)
    DateTimeHour                        (actual missing 20 in time)
    DateTimeMinute                      (actual missing 20:50 in time)
    DateTimeDurationBetweenYear         (actual is 5 and expected is an interval)
    DateTimeSubtract5Hours              (actual missing 05 in time)
    DateTimeSubtractHoursUnderflow      (actual missing 23 in time)
    DateTimeSubtract5Minutes            (actual missing 05:05 in time)
    DateTimeSubtractMinutesUnderflow    (actual missing 04:59 in time)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.