I’ve been using Tick and I cannot find a function to parse a date like “dd.MM.yyyy”
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)
I will want/need to do parsing also....
not having parsing is a big downside compared to cljs-time
(-> (t/date "1918-11-11") (t/at "11:00"))
I'm still looking....(t/date (t/instant "1999-12-31T23:59:59"))
Java 8 Time that this is based on doesn’t have a concept of an open interval
@roklenarcic Have you seen: https://github.com/juxt/tick/issues/68
Specifically the last comment
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"
what about cljs?
IDK, I am JVM-first/mostly kind of person....
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....
seems to be working
on cljs?
yes
Well that is good news....so it seems that there is a path forward for time parsing....