Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit67067f9

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 parentb89ee54 commit67067f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/include/utils/datetime.h

Lines changed: 3 additions & 1 deletion
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
#defineisleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
280282

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp