juxt

roklenarcic 2020-03-23T18:49:58.065700Z

I’ve been using Tick and I cannot find a function to parse a date like “dd.MM.yyyy”

2020-03-23T18:54:51.066700Z

I've gone the other way, that is, formatting a tick time into a string:

created-at        (-> (t/new-time hour minute second)
                                (t/on (t/new-date year month day))
                                (t/in "UTC"))
          created-at-string (t/format (tick.format/formatter "yyyy-MM-dd") created-at)

2020-03-23T18:55:16.067100Z

I will want/need to do parsing also....

roklenarcic 2020-03-23T18:55:44.067400Z

not having parsing is a big downside compared to cljs-time

2020-03-23T18:57:29.068100Z

(-> (t/date "1918-11-11") (t/at "11:00"))
I'm still looking....

2020-03-23T18:59:15.068500Z

(t/date (t/instant "1999-12-31T23:59:59"))

roklenarcic 2020-03-23T18:59:44.069100Z

Java 8 Time that this is based on doesn’t have a concept of an open interval

2020-03-23T19:11:35.069700Z

@roklenarcic Have you seen: https://github.com/juxt/tick/issues/68

2020-03-23T19:12:02.070300Z

Specifically the last comment

2020-03-23T19:15:32.070800Z

So:

(cljc.java-time.local-date/parse "03-05-2020" (t/formatter "dd-MM-yyyy"))
#time/date "2020-05-03"

(cljc.java-time.local-date/parse "03052020" (t/formatter "ddMMyyyy"))
#time/date "2020-05-03"

roklenarcic 2020-03-23T19:16:39.071Z

what about cljs?

2020-03-23T19:17:44.071500Z

IDK, I am JVM-first/mostly kind of person....

2020-03-23T19:18:42.072700Z

But I'm still interested, I have a CLJ/CLJS webapp that deals a lot with time....I was hoping to unify the front and back end time stuff....

roklenarcic 2020-03-23T19:19:45.072900Z

seems to be working

2020-03-23T19:20:02.073200Z

on cljs?

roklenarcic 2020-03-23T19:25:24.073400Z

yes

2020-03-23T19:26:22.074400Z

Well that is good news....so it seems that there is a path forward for time parsing....