       d
       (recur (prev-day d)))))
 
-
 (defn is-event-on-date? 
   [event date]
   (let [event-date (Date. (:start event))]

(defn calendar-hiccup
  "Hiccup tempate for the calendar"
  [calendar-state]
  (let [d (:active-date calendar-state)
        events (:events calendar-state)]
    [:div.callie-view
     prev-next-today-btns 
     [:h2 {:class "month-year"} (month-year-span d)]
     [:table.table.table-bordered
      [:thead weekday-row]
      [:tbody (calendar-body d events)]]]))


(defn inject-cal! [calendar-state] 


(def today (Date.))

(defn first-day
  "First day to display on the calendar. Count back from the given date until
  the day is sunday (0)."
  [d]
