           title (when-not (= (:title document)
                              (:title server))
                   (:title document))
+          date (when-not (= (:document_date document)
+                            (:document_date server))
+                 (.format (DateTimeFormat. "dd.MM.yyyy HH:mm") (:document_date document)))
           tags {:added (remove (set (:tags server)) (:tags document))
                 :removed (remove (set (:tags document)) (:tags server))}]
       (when-not server

                        {:document document
                         :document/id (:id document)
                         :response server})))
      (if (or title (seq (:added tags)) (seq (:removed tags)))
        (let [response (<! (xhr-request! (str "/documents/" (:id document))
                                         :post
                                         {:title title, :tags tags}))]
          (if (= 200 (:status response))
            (let [new-document (-> response
                                   :response/transit

(defn update-document!
  "Diffs the document with the same id on the server with DOCUMENT and
  updates it to match DOCUMENT. Will also update the application
  state (whether DOCUMENT is a cursor or not)."
  [document]
  (go
    (println "saving document" (:id document))
