Liking cljdoc? Tell your friends :D

yang.time


current-utc-millisclj

(current-utc-millis)
source

epochclj

source

hours-backclj

(hours-back hours)
source

inst->tsclj

(inst->ts inst)
source

measurecljmacro

(measure fname report f)

measures a form: => (t/measure "42 sum" println (reduce + (range 42))) "42 sum" took: 49,054 nanos 861

measures a form:
=> (t/measure "42 sum"
              println
              (reduce + (range 42)))
   "42 sum" took: 49,054 nanos
   861
sourceraw docstring

n-hours-agoclj

(n-hours-ago n)
source

now-utcclj

(now-utc)
source

oracle-ts->instantclj

(oracle-ts->instant ts)
source

str->dateclj

(str->date s)
(str->date s default)

parses string date in ISO 8601 if fails returns nil OR a default value when provided:

=> (str->date 42) nil

=> (str->date 42 epoch) ;; epoch is a value from this namespace #inst 1970-01-01T00:00:00.000-00:00

=> (str->date 2020-06-01T22:07:45.519Z epoch) #inst 2020-06-01T22:07:45.519-00:00

parses string date in ISO 8601
if fails returns nil OR a default value when provided:

=> (str->date 42)
nil

=> (str->date 42 epoch)             ;; epoch is a value from this namespace
#inst 1970-01-01T00:00:00.000-00:00

=> (str->date 2020-06-01T22:07:45.519Z epoch)
#inst 2020-06-01T22:07:45.519-00:00
sourceraw docstring

str-big-bangclj

(str-big-bang)
source

str-nowclj

(str-now)
source

str-now-utcclj

(str-now-utc)
source

str-ts-utcclj

(str-ts-utc ts)
source

time-itcljmacro

(time-it expr)

times a form and returns result and time it took in ms:

=> (t/time-it (reduce + (range 42))) [861 {:unit "ms", :time 0.049786}]

times a form and returns result and time it took in ms:

=> (t/time-it  (reduce + (range 42)))
[861 {:unit "ms", :time 0.049786}]
sourceraw docstring

time<clj

(sort-by :foo time< [{:foo t3} {:foo t2} {:foo t1}])

(sort-by :foo time< [{:foo t3} {:foo t2} {:foo t1}])
sourceraw docstring

time>clj

(sort-by :foo time> [{:foo t3} {:foo t2} {:foo t1}])

(sort-by :foo time> [{:foo t3} {:foo t2} {:foo t1}])
sourceraw docstring

to-instclj

(to-inst date)
source

ts->dateclj

(ts->date ts)
source

ts->instclj

(ts->inst ts)
source

ts->sqlclj

(ts->sql ts)
source

ts->zonedtclj

(ts->zonedt ts)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close