Skip to content

Suggestion: operator for getting the interval between two dates #190

@saoirse-a

Description

@saoirse-a

It would be beneficial to not only be able to compare dates, but also get the interval in seconds between them, to compare that to other integer values (e.g. to evaluate if two dates are within a certain interval of each other).

I can imagine a couple of ways this could be done:

  • Dates could support subtract, returning the interval between them
  • Dates could support add/subtract with integers, returning a new date offset by that interval
  • A new operator could take two dates and evaluate to the integer interval between them (equivalent to subtract but using a different operator)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions