git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b89ee54)
C comment: mention 1500-02-29 as an invalid date
2014年11月10日 01:50:15 +0000 (20:50 -0500)
2014年11月10日 01:50:15 +0000 (20:50 -0500)
It is invalid because the Gregorian calendar is used for all years.


diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h
index 548758a14930875211103386d8647ab556e6e1a3..31c78540f285fd3c88248e09a2dcfb8de67ab460 100644 (file)
--- a/src/include/utils/datetime.h
+++ b/src/include/utils/datetime.h
@@ -274,7 +274,9 @@ 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.
+ * 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))
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /