Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions tests/cql/CqlDateTimeOperatorsTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,12 @@
<expression>millisecond from @T23:20:15.555</expression>
<output>555</output>
</test>
<test name="DateTimeComponentFromMonthIsNull" version="1.4">
<capability code="component-extraction"/>
<!-- argument not specified to month precision; result is null -->
<expression>month from DateTime(2012)</expression>
<output>null</output>
</test>
</group>
<group name="Difference" version="1.4">
<capability code="difference-in"/>
Expand Down Expand Up @@ -691,6 +697,12 @@
<expression>difference in milliseconds between @T20:20:15.555 and @T20:20:15.550</expression>
<output>-5</output>
</test>
<test name="DateTimeDifferenceYearBoundary" version="1.4">
<capability code="difference-in"/>
<!-- one year boundary is crossed though the dates are a day apart; contrast with Duration (years between) which is 0 -->
<expression>difference in years between @2011-12-31 and @2012-01-01</expression>
<output>1</output>
</test>
</group>
<group name="From Github issue #29" version="1.4">
<capability code="timezone-offset"/>
Expand Down Expand Up @@ -831,6 +843,12 @@
<expression>days between DateTime(2010, 10, 12, 12, 5) and DateTime(2008, 8, 15, 8, 8)</expression>
<output>-788</output>
</test>
<test name="DateTimeDurationBetweenYearBoundary" version="1.4">
<capability code="duration-between"/>
<!-- zero whole years between dates a day apart; contrast with Difference (difference in years) which is 1 -->
<expression>years between @2011-12-31 and @2012-01-01</expression>
<output>0</output>
</test>
</group>
<group name="Uncertainty tests" version="1.4">
<capability code="precision-based-timing"/>
Expand Down Expand Up @@ -1614,8 +1632,8 @@
<expression>DateTime(2024, 3, 1) - 52 weeks = DateTime(2023, 3, 3)</expression>
<output>true</output>
<!-- EXPECT: The resultant day of the week to match the original day of the week. -->
<!-- 2024-03-01 is a Thursday -->
<!-- 2023-03-03 is a Thursday -->
<!-- 2024-03-01 is a Friday -->
<!-- 2023-03-03 is a Friday -->
</test>
<test name="DateTimeSubtract5Days" version="1.4">
<capability code="date-time-arithmetic"/>
Expand Down
Loading