                      (:location cliopts))
         initfile (when (or ; fetch the XML if a cached copy doesn't exist or is over 15 mins old
                         (not (.exists (io/file filename)))
-                        (> (- (.getTime (java.util.Date.))
-                              (.lastModified (io/file filename)))
-                           900000))
+                        (olderthan (io/file filename) 900000))
                    (spit filename
                          (:body
                           (client/get datauri))))

(def firstcontent (comp first :content))
(def secondcontent (comp second :content))

(defn -main
  [& args]
  (let [climap (parse-opts args cli-options)

  ;; An option with a required argument
  [["-l" "--location PLACE" "Location"
    :default (:defaultlocation (config))
    :validate [#(string? %) "Must be a string"]]
   ;; A non-idempotent option
   ["-m" "--measurement MEASUREMENT" "Measurement"
