This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-23
Channels
- # babashka (68)
- # beginners (133)
- # calva (5)
- # chlorine-clover (21)
- # cider (40)
- # clj-kondo (42)
- # cljs-dev (31)
- # clojure (53)
- # clojure-austin (1)
- # clojure-europe (30)
- # clojure-italy (6)
- # clojure-nl (3)
- # clojure-uk (104)
- # clojurescript (15)
- # datascript (2)
- # datomic (50)
- # emacs (12)
- # fulcro (82)
- # graalvm (4)
- # hoplon (225)
- # jobs (4)
- # jobs-discuss (7)
- # joker (5)
- # juxt (17)
- # kaocha (13)
- # leiningen (16)
- # meander (21)
- # nrepl (18)
- # off-topic (16)
- # pathom (8)
- # pedestal (13)
- # perun (1)
- # re-frame (4)
- # spacemacs (23)
- # testing (28)
- # unrepl (3)
- # vim (5)
- # xtdb (1)
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)
not having parsing is a big downside compared to cljs-time
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
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?
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