diff options
author | Bruce Momjian <bruce@momjian.us> | 2014-11-06 02:33:05 -0500 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2014-11-06 02:33:05 -0500 |
commit | 171c377a0abe12d1418540dc154feccd9355995e (patch) | |
tree | da35fb6e41290d11880faf7f1a85a92b81af99af | |
parent | 525a489915cad1c5b2fc39e43e8005025afe63b2 (diff) | |
download | postgresql-171c377a0abe12d1418540dc154feccd9355995e.tar.gz postgresql-171c377a0abe12d1418540dc154feccd9355995e.zip |
C comment: mention why the Gregorian calendar is used pre-1582
-rw-r--r-- | src/include/utils/datetime.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h index 9b53ee38ccf..548758a1493 100644 --- a/src/include/utils/datetime.h +++ b/src/include/utils/datetime.h @@ -271,6 +271,11 @@ extern const char *const months[]; /* months (3-char abbreviations) */ extern const char *const days[]; /* days (full names) */ 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. + */ #define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) |