Skip to content

Outstand duration expected functions error with larger durations #16

@matt-beanland

Description

@matt-beanland

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions