cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
slipset 2020-07-22T10:00:10.426Z

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

slipset 2020-07-22T10:00:20.426300Z

And playing around in the repl:

slipset 2020-07-22T10:00:34.426700Z

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

slipset 2020-07-22T10:00:58.426900Z

whereas

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

slipset 2020-07-22T10:01:39.427100Z

and

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

slipset 2020-07-22T10:04:45.427600Z

and

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

slipset 2020-07-22T10:05:29.427800Z

but

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

slipset 2020-07-22T10:08:59.428Z

This is running in a noderepljs

slipset 2020-07-22T10:14:48.428900Z

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?

thheller 2020-07-22T11:21:47.429400Z

@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

dnolen 2020-07-22T11:49:02.429600Z

thanks will take a look