Commit 171c377a authored by Bruce Momjian's avatar Bruce Momjian

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

parent 525a4899
...@@ -271,6 +271,11 @@ extern const char *const months[]; /* months (3-char abbreviations) */ ...@@ -271,6 +271,11 @@ extern const char *const months[]; /* months (3-char abbreviations) */
extern const char *const days[]; /* days (full names) */ extern const char *const days[]; /* days (full names) */
extern const int day_tab[2][13]; 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)) #define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment