   ;; TODO: From what year does this algorithm makes sense from, need
   ;; to throw an exception outside this range.
   [year]
-  (let [year (core/int (core/year year))
+  (let [year (t/int (t/year year))
         a (mod year 19)
         b (quot year 100)
         c (mod year 100)

    (LocalDate/of year n (+ p 1))))

(defn good-friday [year]
  (.minusDays (easter-sunday (core/int (core/year year))) 2))

(defn good-friday-holiday [year]
  (holiday "Good Friday" (good-friday (core/int (core/year year)))))

(defn easter-monday [year]
  (.plusDays (easter-sunday (core/int (core/year year))) 1))

(defn easter-monday-holiday [year]
  (holiday "Easter Monday" (easter-monday (core/int (core/year year)))))

(defn may-day [year]
  (LocalDate/of (core/int (core/year year)) 5 1))

(defn early-may-bank-holiday [year]
  (holiday "Early May bank holiday"
           (first-named-day-from (may-day (core/int (core/year year))) DayOfWeek/MONDAY)))

(defn spring-bank-holiday [year]
  (holiday "Spring bank holiday"
           (last-monday-of-month (YearMonth/of (core/int (core/year year)) Month/MAY))))

(defn summer-bank-holiday [year]
  (holiday "Summer bank holiday"
           (last-monday-of-month (YearMonth/of (core/int (core/year year)) Month/AUGUST))))

(defn christmas-day [year]
  (LocalDate/of (core/int (core/year year)) 12 25))

(s/fdef christmas-day
        :args (s/cat :year ::year)
        :ret ::date)

(defn christmas-day-holiday [year]
  (let [day (christmas-day (core/int (core/year year)))
        hol (cond-> day
              (#{DayOfWeek/SATURDAY DayOfWeek/SUNDAY} (.getDayOfWeek day)) (.plusDays 2))]
    (holiday "Christmas Day" day hol)))

        :ret ::holiday)

(defn new-years-day [year]
  (LocalDate/of (t/int (t/year year)) 1 1))

(defn new-years-day-holiday [year]
  (let [day (new-years-day (t/int (t/year year)))
        hol (cond-> day (weekend? day) (first-named-day-from DayOfWeek/MONDAY))]
    (holiday "New Year's Day" day hol)))

