diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c
index 765c6aa..8eb7d5d 100644
--- a/src/backend/utils/adt/formatting.c
+++ b/src/backend/utils/adt/formatting.c
@@ -1997,7 +1997,7 @@ adjust_partial_year_to_2020(int year)
 	else if (year >= 70 && year < 100)
 		return year + 1900;
 	/* Force 100-519 into the 2000's */
-	else if (year >= 100 && year < 519)
+	else if (year >= 100 && year <= 519)
 		return year + 2000;
 	/* Force 520-999 into the 1000's */
 	else if (year >= 520 && year < 1000)
