Skip to content

Commit 67067f9

Browse files
committed
C comment: mention 1500-02-29 as an invalid date
It is invalid because the Gregorian calendar is used for all years.
1 parent b89ee54 commit 67067f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/include/utils/datetime.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,9 @@ extern const int day_tab[2][13];
274274
/*
275275
* These are the rules for the Gregorian calendar, which was adopted in 1582.
276276
* However, we use this calculation for all prior years as well because the
277-
* SQL standard specifies use of the Gregorian calendar.
277+
* SQL standard specifies use of the Gregorian calendar. This prevents the
278+
* date 1500-02-29 from being stored, even though it is valid in the Julian
279+
* calendar.
278280
*/
279281
#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
280282

0 commit comments

Comments
 (0)