Fork me on GitHub
#clojure-spec
<
2019-08-30
>
johanatan05:08:31

does spec-alpha2 support clojurescript?

Alex Miller (Clojure team)12:08:05

No, we will probably hold off on that till churn slows down

hkjels08:08:13

Generating from the spec: (s/inst-in #inst "1984" #inst "2019") will just return dates from 1984 What’s the idiomatic way of generating random dates within a range? #inst only works with string literals and not computed strings

Alex Miller (Clojure team)12:08:03

Samples are biased to beginning of the range, but “grow” as you make more

4
Alex Miller (Clojure team)12:08:41

So if you sample a larger number you’ll see more variety

mpenet10:08:10

(java.util.Date. x) with some random number within the range

hkjels10:08:41

problem was actually the string I created. Your absolutely correct @mpenet