mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-02 17:01:20 +02:00
C comment: mention 1500-02-29 as an invalid date
It is invalid because the Gregorian calendar is used for all years.
This commit is contained in:
parent
b89ee54e20
commit
67067f9ae3
@ -274,7 +274,9 @@ extern const int day_tab[2][13];
|
|||||||
/*
|
/*
|
||||||
* These are the rules for the Gregorian calendar, which was adopted in 1582.
|
* 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
|
* 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))
|
#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user