       errors (exit 1 (error-msg errors)))
     ;; Execute program with options
     (case (first arguments)
-      "create" (create options arguments)
+      "create" (create (assoc options
+                              :issue-date (parse-today-default (:issue-date options)))
+                       arguments)
       "data" (data options)
       "list" (list_ options)
-      "record-payment" (record-payment options arguments)
+      "record-payment" (record-payment (assoc options
+                                              :paid-on (parse-today-default (:paid-on options)))
+                                       arguments)
       (exit 1 (usage summary)))))

  (println msg)
  (System/exit status))

(defn read-json [file]
  (json/read-str (slurp file)))

(defn write-json [file value]
  (with-open [w (io/writer file)]
    (.write w (json/write-str value))))

(defn id-to-filename [id]
  (str id ".json"))

(defn read-invoice [id]
  (read-json (id-to-filename id)))

(defn write-invoice [id value]
  (write-json (id-to-filename id) value))

(defn create [options arguments]
  (cond
    (not (:currency options)) (exit 1 (error-msg ["-c CURRENCY is required"]))

            [clj-time.format :as f]
            [clojure.string :as string])
  (:gen-class))

(defn cwd []
  (System/getProperty "user.dir"))

(def date-formatter
  (f/formatter "yyyy-MM-dd"))
