Date protocol for optimization.
Design decision:
Constraints:
compare-date
is a total order relation.equal-date
is an equivalence relation.Date protocol for optimization. Design decision: * This concept does not include the transformation of that date in a real time stamped date. * Rationale: * For simplicity of this namespace, every transformation from integer to timestamp date, taking into account the scenario starting date. * Projects that don't need real dates won't be forced to. * Implications: * No function in the protocol is about turning the date into in a real life date. * Limits: * None known. Constraints: * `compare-date` is a total order relation. * `equal-date` is an equivalence relation.
(add-delay _ delay-date)
Add the delay-date
to the date
Add the `delay-date` to the date
(compare-date date1 date2)
Returns true if date1
is before date2
Returns true if `date1` is before `date2`
(equal-date date1 date2)
Returns true if date1
equal date2
Returns true if `date1` equal `date2`
(substract-delay _ delay-date)
Substract the delay-date
to the date
Substract the `delay-date` to the date
(delay-date _)
Returns the delay value
Returns the delay value
(negate _)
Returns the opposite of the delay
Returns the opposite of the delay
(strictly-compare date1 date2)
Compare date1
and date2
but return false if they' identical
Compare `date1` and `date2` but return false if they' identical
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close