 (defn days [n]
   (Duration/ofDays n))
 
+(defn weeks [n]
+  (Duration/ofDays (* 7 n)))
+
+(defn now [] (Instant/now))
+
 (s/def ::instant #(instance? Instant %))
 
 (defprotocol IInstant

(extend-protocol IInstant
  String
  (instant [s] (Instant/from (.parse (DateTimeFormatter/ISO_INSTANT) s))))

;; Copyright © 2016-2017, JUXT LTD.

(ns tick.core
  (:refer-clojure :exclude [+ - inc dec max min range])
  (:require
   [clojure.spec.alpha :as s])
  (:import
   [java.time Clock ZoneId Instant Duration DayOfWeek Month ZonedDateTime LocalDate]
   [java.time.format DateTimeFormatter]
   [java.time.temporal ChronoUnit]))

(defn nanos [n]
  (Duration/ofNanos n))
