Fork me on GitHub
#clojurescript
<
2021-03-06
>
zendevil.eth05:03:21

added the extra

.
But still not seeing the full date like so: “March 20, 2021”

henryw37406:03:17

in http://app.klipse.tech/, paste in top left box

(->
       (js/Intl.DateTimeFormat. "en-US"
                               #js {:dateStyle "full" :timeStyle "long"})
       (.format (js/Date.)))
shows
"Saturday, March 6, 2021 at 6:46:29 AM GMT"
which looks right afaik.

zendevil.eth07:03:47

@U051B9FU1 when I put the following in the app, I get “3/6/2021”

zendevil.eth07:03:37

shows “Saturday, March 6, 2021 at 12:58:25 PM GMT+5:30” in chrome but 3/6/2021 in safari and react native

zendevil.eth07:03:43

how to fix this?

valtteri08:03:21

dateStyle is not supported in Safari. You need to use something else. Google closure library surely has utils for this.

henryw37408:03:15

Ah. Fallback option could be Google closure https://google.github.io/closure-library/api/goog.i18n.DateTimeFormat.html that might have what you need.

Jakub Holý (HolyJak)15:03:30

Hello! What needs to be true for a macro to be self-host compatible? My quick search did not reveal any good answer.... Thank you!

thheller15:03:56

it must not use any CLJ JVM specific code. thats about it.

👍 6
❤️ 3