Fork me on GitHub
#cljs-dev
<
2020-07-22
>
slipset10:07:10

This is kind’a interesting. While working on https://clojure.atlassian.net/browse/CLJS-3263 I see that my test is failing.

slipset10:07:20

And playing around in the repl:

slipset10:07:34

cljs.reader=> (def foo #inst "0985-04-12T23:20:50.520-00:00")
#'cljs.reader/foo
cljs.reader=> (.getUTCDate foo)
17
cljs.reader=>

slipset10:07:58

whereas

cljs.reader=> (parse-and-validate-timestamp "0985-04-12T23:20:50.520-00:00")
[985 4 12 23 20 50 520 0]

slipset10:07:39

and

cljs.reader=> (read-date "0985-04-12T23:20:50.520-00:00")
#inst "0985-04-12T23:20:50.520-00:00"

slipset10:07:45

and

cljs.reader=> (read-string "#inst \"0985-04-12T23:20:50.520-00:00\"")
#inst "0985-04-12T23:20:50.520-00:00"

slipset10:07:29

but

cljs.reader=> #inst "0985-04-12T23:20:50.520-00:00"
#inst "0985-04-17T23:20:50.520-00:00"

slipset10:07:59

This is running in a noderepljs

slipset10:07:48

So it seems to me that #inst "0985-04-12T23:20:50.520-00:00" is not parsed by cljs.reader ? If that is correct, where is it parsed?

thheller11:07:47

@dnolen added a patch for CLJS-3200 if you are still looking for small things to add for the next release. https://clojure.atlassian.net/browse/CLJS-3200

dnolen11:07:02

thanks will take a look