1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-09 18:21:05 +03:00

C comment: mention why the Gregorian calendar is used pre-1582

This commit is contained in:
Bruce Momjian 2014-11-06 02:33:05 -05:00
parent 525a489915
commit 171c377a0a

View File

@ -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))