Liking cljdoc? Tell your friends :D

tick

A Clojure(Script) library for dealing with time. Intended as a replacement for clj-time.

Based on Java 8 time (on the JVM) and js-joda (on JavaScript runtimes).

(require '[tick.alpha.api :as t])

;; Get the current time
(t/now)

Status

Alpha: Ready to use with the caveat that the API might still undergo minor changes.

Install

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

Tick versions 0.4.24-alpha and up require minimum Clojurescript version of 1.10.741

There are some extra considerations when using tick from Clojurescript, see file docs/cljs.adoc in this repo.

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

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

Development

CircleCI

Develop The Documentation Site

Build the Cljs

make dev-docs-cljs

Build the html

make docs/index.html

Serve the docs directory and navigate to it in a browser

Develop Tick

REPL with nREPL server

make nrepl

connect to the printed port

Once in, start cljs build with:

(figwheel-start!)

Run tests with:

make test

npm dependencies

For running the ClojureScript tests you will need the following npm dependencies installed:

sudo npm install karma-cli -g
npm install karma --save-dev
npm install karma-chrome-launcher
npm install karma-cljs-test

Acknowledgements

Tick is based on the same original idea as Chime. The motivation is to be able to view timelines of remaining times while the schedule is running. Thanks to James Henderson for his work on Chime.

In particular, special credit to Eric Evans for discovering Allen’s interval algebra and pointing out its potential usefulness, demonstrating a working implementation of Allen’s ideas in his Clojure library.

Thanks also to my esteemed colleagues Patrik Kårlin for his redesign of the interval constructor function, and Henry Widd for porting to cljc.

The MIT License (MIT)

Copyright © 2016-2020 JUXT LTD.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Can you improve this documentation? These fine people already did:
Malcolm Sparks, Henry Widd, Martin Klepsch, Andrea Crotti, Caro, Xavi Caballé, Arne Brasseur & Oliver George
Edit on GitHub

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

× close