Fork me on GitHub
#clojure-spec
<
2020-01-18
>
dharrigan14:01:22

Is there an example of how I might use spec to ensure that a field is in OffsetDateTime format?

Alex Miller (Clojure team)15:01:23

#(instance? OffsetDateTime %) ?

dharrigan15:01:10

will try that

dharrigan15:01:06

Sorta gets me there, the field is a string, so I think I'll have to do some extra magic

Alex Miller (Clojure team)15:01:58

probably need to use a parser then

Alex Miller (Clojure team)15:01:12

which is part of the java time library

dharrigan15:01:28

thanks for the pointer 🙂