Class DifferenceBetween

All Implemented Interfaces:
org.jvnet.jaxb2_commons.lang.Equals2, org.jvnet.jaxb2_commons.lang.HashCode2, org.jvnet.jaxb2_commons.lang.ToString2
Direct Known Subclasses:
DifferenceBetweenEvaluator

public class DifferenceBetween extends BinaryExpression implements org.jvnet.jaxb2_commons.lang.Equals2, org.jvnet.jaxb2_commons.lang.HashCode2, org.jvnet.jaxb2_commons.lang.ToString2
The DifferenceBetween operator returns the number of boundaries crossed for the specified precision between the first and second arguments. If the first argument is after the second argument, the result is negative. Because this operation is only counting boundaries crossed, the result is always an integer. For Date values, precision must be one of Year, Month, Week, or Day. For Time values, precision must be one of Hour, Minute, Second, or Millisecond. For calculations involving weeks, Sunday is considered to be the first day of the week for the purposes of determining boundaries. When calculating difference between DateTime values with different timezone offsets, implementations should normalize to the timezone offset of the evaluation request timestamp, but only when the comparison precision is hours, minutes, seconds, or milliseconds. If either argument is null, the result is null. Note that this operator can be implemented using Uncertainty as described in the CQL specification, Chapter 5, Precision-Based Timing.

Java class for DifferenceBetween complex type.

The following schema fragment specifies the expected content contained within this class.

 <complexType name="DifferenceBetween">
   <complexContent>
     <extension base="{urn:hl7-org:elm:r1}BinaryExpression">
       <attribute name="precision" type="{urn:hl7-org:elm:r1}DateTimePrecision" />
     </extension>
   </complexContent>
 </complexType>