Skip to content

Commit

Permalink
more on 19
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Wilson committed Jan 29, 2011
1 parent 610c82e commit 8712697
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 019.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ daysInMonth date
where
m = month date
y = year date

dayShiftFromYearChange :: Year -> Year -> Int
dayShiftFromYearChange start end = mod7 (sum $ map daysInYear [start..end-1])

mod7 :: Int -> Int
mod7 n = mod n 7

0 comments on commit 8712697

Please sign in to comment.