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

Commit171c377

Browse files
committed
C comment: mention why the Gregorian calendar is used pre-1582
1 parent525a489 commit171c377

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/include/utils/datetime.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@ extern const char *const months[];/* months (3-char abbreviations) */
271271
externconstchar*constdays[];/* days (full names) */
272272
externconstintday_tab[2][13];
273273

274+
/*
275+
* These are the rules for the Gregorian calendar, which was adopted in 1582.
276+
* However, we use this calculation for all prior years as well because the
277+
* SQL standard specifies use of the Gregorian calendar.
278+
*/
274279
#defineisleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
275280

276281

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp