 
 (enable-console-print!)
 
-(defn week []
-  (subs
-    (get
-      (str/split
-        (format/unparse (format/formatters :week-date) (t/now))
-        #"-")
-      1) 1))
+(defn week-nr []
+  (subs (get (str/split
+               (f/unparse (f/formatters :week-date) (t/now))
+               #"-")
+             1) 1))
 
-(def app-state (atom {:text (str "Viikko " (week)) :date ""}))
+(def app-state (atom {:text (str "Viikko " (week-nr)) :date ""}))
 
 (def day-map
   {1 {:name "Ma" :date ""}

   4 {:name "To" :date ""}
   5 {:name "Pe" :date ""}
   6 {:name "La" :date ""}
   7 {:name "Su" :date ""}})

(def date-format
  (format/formatter "dd.MM."))

(defn update-vals [m f & args]
  (reduce
    (fn [r [k v]] (assoc r k (apply f v args)))
    {} m))

(defn today []
  (format/unparse date-format (t/now)))

(defn week-day [date]
  (t/day-of-week date))

(defn week-dates []
  (assoc-in day-map [(week-day (t/now))
                      :date] (today)))

(defcomponent week-view [app owner]
              (render [this]


(defcomponent app-view [app owner]
              (render [this]
                      (print (f/show-formatters))
                      (ot/div {:class "column-main"}
                              (dom/h1 nil (str (:text app) " " (:date app)))
                              (om/build week-view app)
