Liking cljdoc? Tell your friends :D

Setup

Get the latest from Clojars and add to your project.clj, build.boot or deps.edn.

Here is a one-liner to drop into a node repl with tick:

clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.764" } tick {:mvn/version "0.4.24-alpha"} }}' -m cljs.main  -re node  --repl

Serialization

There are many use cases for de/serialization of dates, including simply being able to copy and paste within the REPL. Tick bundles time-literals Clojure(Script) library, so having require’d tick, in your code or at the repl you can type

#time/period "P1D"

which is read as a java.time.Period (or js-joda Period in ClojureScript).

To avoid tick modifying the printer for java.time objects (if you already employ a custom set of literals for example), set the following jvm property

:jvm-opts ["-Dtick.time-literals.printing=false"]

To read and write edn data containing these literals in Clojure(Script) and for more information generally, see the tagged literals Readme

Can you improve this documentation? These fine people already did:
Henry Widd, Caro & Malcolm Sparks
Edit on GitHub

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

× close