Skip to content

Commit

Permalink
Merge pull request #230 from nathanfhunter/master
Browse files Browse the repository at this point in the history
Fix off-by-one error in year builder.
  • Loading branch information
lpsmith committed Nov 15, 2017
2 parents 62bea80 + bfc5036 commit 70e19cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/PostgreSQL/Simple/Time/Internal/Printer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ frac = condB (== 0) emptyB ((,) '.' >$< (liftB char8 >*< trunc12))


year :: BoundedPrim Int32
year = condB (> 10000) int32Dec (checkBCE >$< liftB digits4)
year = condB (>= 10000) int32Dec (checkBCE >$< liftB digits4)
where
checkBCE :: Int32 -> Int
checkBCE y
Expand Down

0 comments on commit 70e19cd

Please sign in to comment.