Skip to content

Commit

Permalink
Fix leap year off-by-one bug in date arithmetic
Browse files Browse the repository at this point in the history
Closes marijnh#12
  • Loading branch information
marijnh committed Mar 22, 2012
1 parent 0346165 commit 3e6dd76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simple-date/simple-date.lisp
Expand Up @@ -121,7 +121,7 @@ milliseconds."
"Days in a certain month -- note that these months use internal
encoding."
(case month
(11 (if (leap-year-p year) 29 28))
(11 (if (leap-year-p (1+ year)) 29 28))
((1 3 6 8) 30)
(t 31)))

Expand Down

0 comments on commit 3e6dd76

Please sign in to comment.