[#8231] Negative YearToMonth() intervals are not correctly normalised
This commit is contained in:
parent
4fd86b411e
commit
add94df523
@ -105,7 +105,7 @@ public final class YearToMonth extends Number implements Interval, Comparable<Ye
|
||||
|
||||
// Perform normalisation. Specifically, Postgres may return intervals
|
||||
// such as 0-13
|
||||
if (months >= 12) {
|
||||
if (Math.abs(months) >= 12) {
|
||||
years += (months / 12);
|
||||
months %= 12;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user