macro | removed v1.9.542 | added v1.9.75 | Edit |
(inst-in start end)
Returns a spec that validates insts in the range from start (inclusive) to end (exclusive).
(defmacro inst-in
[start end]
`(let [st# (cljs.core/inst-ms ~start)
et# (cljs.core/inst-ms ~end)
mkdate# (fn [d#] (js/Date. d#))]
(spec (and cljs.core/inst? #(inst-in-range? ~start ~end %))
:gen (fn []
(gen/fmap mkdate#
(gen/large-integer* {:min st# :max et#}))))))