Skip to content

Commit

Permalink
Fix off-by-one error in year builder.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanfhunter committed Nov 15, 2017
1 parent 62bea80 commit bfc5036
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 bfc5036

Please sign in to comment.