Open ychenz opened 2 years ago
I see what you are talking about, but this is part of Clojure language and has nothing to do with the library. That’s how reader tags work—they are processed roughly at the parsing stage, before any of the variables has a chance to resolved.
Think of #inst "
as of fancy quotation mark "
, just a little longer and producing Date instead of a String.
See https://clojure.org/reference/reader#_built_in_tagged_literals
Hi team!
I am pretty new to ClojureScript and developing using Shadow-cljs and Reframe. The part of README that explains how to format date using the
translate
function works fine only when plain strings are passed, but it will throw a compilation error as soon as the plain string is replaced with a variable:Here is what's mentioned in the README
Here is the error screenshot:![image](https://user-images.githubusercontent.com/10768904/155380727-1916603e-8aad-4c61-9543-357a18ae96c0.png)
The error is resolved when I replaced
#inst <string-var>
with(js/Date. <string-var>)
. I'm just thinking maybe it is better to mention this in the README so it will be easier for new developers to use this library.Thank you! Yuchen