Hello! Someone knows how to get the current time from OS using Joker?
(i mean... without calling a shell or another executable in OS...)
See the joker.time
namespace.
I've seen, but I couldn't figure out. When I call joker.time/now
I get back a #object[Proc] that I couldn't use in any place...
I've tried call string
, parse
, etc on it, but uncessfully
A Proc is just an internally compiled Fn. I.e. you call it.
wow
my bad
thank u
And it doesn't return just a String
, but a Time
object that you can further manipulate:
user=> (type (joker.time/now))
Time
user=> (joker.time/now)
2020-01-11 09:54:15.601988473 -0500 EST m=+9.694898411
user=> (let [cur (now)] (sleep (* second 3)) (println (sub (now) cur)))
3000091841
nil
user=>
(Forgot to show the (use 'joker.time)
in there before the (let ...
.)
Joker v0.14.1 has been released: https://github.com/candid82/joker/releases/tag/v0.14.1