This pull request adds the possibility to specify the precision for time comparisons in time switch and filter nodes (previously, comparison was always on millisecond precision). The precision is applicable to the operators before, after, between and outside as well as to the new operators ==, !=, until and since. The new operators have been added to have more comparison flexibility in case of lower comparison precisions. The precision ranges from the granularity of milliseconds up to the granularity of years. Additionally, the new JSONata function $isSame() corresponding to the == operator has been added. The functions $isBefore(), $isAfter(), $isBetween() and $isOutside() have been updated to work with precisions, too.
‼️ Breaking Changes ‼️
Operator after previously had the meaning of "same or after" and now has the meaning of "after" only. The new operator since takes over the meaning of "same or after".
The JSONata functions $isBetween() and $isOutside() have two additional, non-optional arguments precision1 and precision2 denoting the precisions for the two times to compare.
This pull request adds the possibility to specify the precision for time comparisons in time switch and filter nodes (previously, comparison was always on millisecond precision). The precision is applicable to the operators before, after, between and outside as well as to the new operators ==, !=, until and since. The new operators have been added to have more comparison flexibility in case of lower comparison precisions. The precision ranges from the granularity of milliseconds up to the granularity of years. Additionally, the new JSONata function
$isSame()
corresponding to the == operator has been added. The functions$isBefore()
,$isAfter()
,$isBetween()
and$isOutside()
have been updated to work with precisions, too.‼️ Breaking Changes ‼️
$isBetween()
and$isOutside()
have two additional, non-optional argumentsprecision1
andprecision2
denoting the precisions for the two times to compare.