#inst literal can print with fewer than 4 characters

Description

#inst is defined by edn to employ the RFC-3339 format (https://github.com/edn-format/edn#inst-rfc-3339-format)

This can fail for years prior to 1000:

Compare with Clojure:

Environment

None

Activity

Show:
Mike Fikes
July 18, 2020, 8:01 PM

Hey Erik, maybe it is easy to add a unit test or two for this one? Along the lines of this and perhaps one that covers a modern year?

(is (= "#inst \"0985-04-12T23:20:50.520-00:00\"" (pr-str #inst "0985-04-12T23:20:50.520-00:00")))

Erik Assum
July 22, 2020, 10:12 AM

There is some trickery with the date here which I’m not able to figure out. Have a look at #cljs-dev

Erik Assum
July 22, 2020, 10:17 AM

Assignee

Mike Fikes

Reporter

Mike Fikes

Labels

None

Approval

None

Patch

Code

Priority

Minor
Configure