Skip to content
Time as a value.
Branch: master
Clone or download
Malcolm Sparks
Latest commit 780855f Mar 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aliases
bin Add rebel-readline Apr 24, 2018
dev cljs repl utils May 14, 2018
docs Remove unnecessary phrasing Mar 21, 2019
resources/ics/gov.uk Calendars Feb 9, 2018
src/tick
test Support comparison of durations Mar 21, 2019
.gitignore
LICENSE
Makefile fix typo in makefile Feb 16, 2019
README.adoc
circle.yml remove lein. use figwheel main for js tests. need to reintroduce a ru… Sep 28, 2018
deps.edn switch reader literals to #time/date"1111-11-11" etc and provide cons… Feb 17, 2019
docs.cljs.edn
generate_docs
package.json change how code for docs is compiled. now a single standalone js file… Nov 21, 2018
pom.xml switch reader literals to #time/date"1111-11-11" etc and provide cons… Feb 17, 2019
tick.cljs.edn remove lein. use figwheel main for js tests. need to reintroduce a ru… Sep 28, 2018

README.adoc

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.

To use tick with Shadow-CLJS, there are some extra steps

Development

with Clojure

REPL with nREPL server

clj -Adev

Port is written to .nrepl-port.

Run tests with:

make test

with ClojureScript

Various options:

make figwheel

Or, From the Clojure REPL type (node) to get a node repl.

Documentation

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-2018 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.

You can’t perform that action at this time.