Fork me on GitHub
#clojurescript
<
2019-12-18
>
Søren Sjørup10:12:02

I’m a bit surprised to see:

cljs.user=> #inst "0099-12-17T03:24:00.000-00:00"
#inst "1999-12-17T03:24:00.000-00:00"
On https://clojurescript.io

delaguardo11:12:52

this is correct) according to JS meaning of Date)

delaguardo11:12:03

internally string "0099" been parsed as integer and transformed to 99 then it is passed to Date constructor

Søren Sjørup13:12:15

In Safari it’s different.

Søren Sjørup13:12:42

But I noticed that this constructor is not used by the reader. Rather it parses using a regex and constructs the date using js/Date.UTC and that has the rule that “0-99 means 1900-1999”.

Søren Sjørup13:12:45

Another interesting thing is that dates before year 1000 renders as an instant that the reader doesn’t parse:

cljs.user=> (js/Date. (js/Date.UTC 999 1 0 0 0 0 0 0))
#inst "999-01-31T00:00:00.000-00:00"
cljs.user=> #inst "999-01-31T00:00:00.000-00:00"
Unrecognized date/time syntax: 999-01-31T00:00:00.000-00:00 - Unrecognized date/time syntax: 999-01-31T00:00:00.000-00:00

Søren Sjørup13:12:39

I guess changing https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/core.cljs#L10146 to (normalize (str (.getUTCFullYear obj)) 4) "-" would fix it.

aarkerio19:12:14

hi! quick question: what port do you use to connect Figwheel main with Emacs cider?

aarkerio19:12:38

I tried 9500 but no luck so far.

Michaël Salihi07:12:26

It's for React Native right? If so, you must forwarding the port 9500 ~/Android/Sdk/platform-tools/adb reverse tcp:9500 tcp:9500

sova-soars-the-sora20:12:48

hallo, i'm wondering how i would do a dictionary lookup on my server side for clicked on text on the clientside. my main question there is how can i catch text via click, for words inside of paragraphs?

p-himik20:12:50

https://stackoverflow.com/questions/7563169/detect-which-word-has-been-clicked-on-within-a-text Seems to work. One downside is that it makes the word selected. But that should not be that hard to fix.

4
😅 4
sova-soars-the-sora21:12:27

it's actually kinda desirable that it highlights the word