correct_dates.patch

text/x-patch

Filename: correct_dates.patch
Type: text/x-patch
Part: 0
Message: small bug on 3-digit years in 9.2-dev

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
src/backend/utils/adt/formatting.c 1 1
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)