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)