Skip to content
Browse files

refactored 19

  • Loading branch information...
1 parent 470f164 commit 4a3245ebffebde7d16ee7724bed127a289190c0e Eric Wilson committed Jan 30, 2011
Showing with 8 additions and 2 deletions.
  1. +4 −1 019.hs
  2. +4 −1 EulerUtil/Dates.hs
View
5 019.hs
@@ -30,4 +30,7 @@ dayOfWeek :: Date -> Int
dayOfWeek date = mod7 $ epochDayOfWeek + daysSinceEpoch date
isSunday :: Date -> Bool
-isSunday date = dayOfWeek date == 0
+isSunday date = dayOfWeek date == 0
+
+startsWithSunday :: Year -> Year -> [Date]
+startsWithSunday start end = filter isSunday $ monthsInYears start end
View
5 EulerUtil/Dates.hs
@@ -2,7 +2,10 @@ module EulerUtil.Dates
( Year
, Month
, Day
-, Date
+, Date(Date)
+, year
+, month
+, day
, isLeapYear
, daysInYear
, daysInMonth

0 comments on commit 4a3245e

Please sign in to comment.
Something went wrong with that request. Please try again.