aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2014-11-09 20:50:15 -0500
committerBruce Momjian <bruce@momjian.us>2014-11-09 20:50:15 -0500
commit67067f9ae35fcaf7c1a6f3258043cbd0a0380473 (patch)
tree71f8432ca8419a22da64c13472ff8a403f3a3685 /src
parentb89ee54e20e722bb91f388667586a2e0986f197b (diff)
downloadpostgresql-67067f9ae35fcaf7c1a6f3258043cbd0a0380473.tar.gz
postgresql-67067f9ae35fcaf7c1a6f3258043cbd0a0380473.zip
C comment: mention 1500-02-29 as an invalid date
It is invalid because the Gregorian calendar is used for all years.
Diffstat (limited to 'src')
-rw-r--r--src/include/utils/datetime.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h
index 548758a1493..31c78540f28 100644
--- a/src/include/utils/datetime.h
+++ b/src/include/utils/datetime.h
@@ -274,7 +274,9 @@ extern const int day_tab[2][13];
/*
* These are the rules for the Gregorian calendar, which was adopted in 1582.
* However, we use this calculation for all prior years as well because the
- * SQL standard specifies use of the Gregorian calendar.
+ * SQL standard specifies use of the Gregorian calendar. This prevents the
+ * date 1500-02-29 from being stored, even though it is valid in the Julian
+ * calendar.
*/
#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))