             [setup_dropbox]
             [goog.i18n.DateTimeFormat :as dtf]))
 
+(enable-console-print!)
+
 ;
 ; Constants
 ;
 
 (def ^:const PAGESIZE 10)
 (def ^:const DB "/data.json")
+(def ^:const DATEFORMAT "d.M.yyyy H:mm")
 
 ;
 ; Mithril helpers

; Closure helpers
;

(defn format_time [d]
  (let [format (new goog.i18n.DateTimeFormat "d.M.yyyy H:mm")]
    (.format format d)))

;

                comment (get item "comment" "")
                time (get item "time" "")
                pos (+ start i)]
              (nm "tr" [(m "td.itemtitle" nil title)
                           (nm "td" (m "a.link" {:href url} "Link"))
                           (nm "td" (if (not(= "" referer)) (m "a.link" {:href referer} "Referer")))
                           (nm "td" (format_time (new js/Date time) DATEFORMAT))
                           (nm "td" comment)
                           (nm "td"
                              [(nm "button.pure-button" {:onclick #(edit item pos)} "Edit")
                               (nm "button.pure-button" {:onclick #(delete pos)} "Remove")])])))
        (if (< PAGESIZE (count data))
          (subvec data start (+ start PAGESIZE))
          data))]))
