Outstand duration expected functions greater_than, less_than, bounded_by, unbounded_by won't work with larger durations. The functions will error if months and or years are present in either duration.
They compare expected and actual Duration using Kernel to_timeout(), however larger durations (those with years, months) are not inherently comparable since we cannot overflow weeks to months without a reference instant.
We could improve them so they won't error by converting years and months and comparing them separately, and using timeout for the remainder of the durations. This will still have corner cases.
Best if we simply use DateTime.utc_now() as a reference instant, and run outstanding on DateTimes shifted by expected and actual durations.
Outstand duration expected functions greater_than, less_than, bounded_by, unbounded_by won't work with larger durations. The functions will error if months and or years are present in either duration.
They compare expected and actual Duration using Kernel to_timeout(), however larger durations (those with years, months) are not inherently comparable since we cannot overflow weeks to months without a reference instant.
We could improve them so they won't error by converting years and months and comparing them separately, and using timeout for the remainder of the durations. This will still have corner cases.
Best if we simply use DateTime.utc_now() as a reference instant, and run outstanding on DateTimes shifted by expected and actual durations.