Permalink
Browse files

Merge pull request #6 from mcna/master

Bug fix for timestamp-whole-year difference
  • Loading branch information...
2 parents 2da3c6f + 88662a0 commit 6174177d91499a916f7f355bc8bb160d5e8ba7c9 @dlowe-net committed Mar 3, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/local-time.lisp
View
@@ -805,7 +805,11 @@ the previous day given by OFFSET."
(decode-timestamp time-a)
(declare (ignore nsec-b sec-b minute-b hour-b day-b month-b day-of-week-b daylight-p-b zone-b))
(let ((year-difference (- year-b year-a)))
- (if (timestamp<= (encode-timestamp nsec-a sec-a minute-a hour-a day-a month-a
+ (if (timestamp<= (encode-timestamp nsec-a sec-a minute-a hour-a
+ (if (= month-a 2)
+ (min 28 day-a)
+ day-a)
+ month-a
(+ year-difference year-a))
time-a)
year-difference

0 comments on commit 6174177

Please sign in to comment.