gregor icon indicating copy to clipboard operation
gregor copied to clipboard

time-period-between expects datetime-provider?

Open nick-chandoke opened this issue 4 years ago • 1 comments

The example expression (time-period-between (time 10 30) (time 11 00) '(seconds)) fails because seconds-between (and any other *-between functions) require datetime-provider?, as per their contracts. Thus time-period-between fails for all time-provider? that aren't datetime-provider?, regardless of fields. An easy fix is providing datetimes with dummy year, month, and date, e.g. (time-period-between (datetime 1 1 1 10 30) (datetime 1 1 1 11 00) '(seconds)), but at this point time-period-between is identical to period-between.

nick-chandoke avatar May 05 '20 16:05 nick-chandoke