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

Appearance settings

Commit 171c377

Browse filesBrowse files
committed
C comment: mention why the Gregorian calendar is used pre-1582
1 parent 525a489 commit 171c377
Copy full SHA for 171c377

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed

‎src/include/utils/datetime.h

Copy file name to clipboardExpand all lines: src/include/utils/datetime.h
+5Lines 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
extern const char *const days[]; /* days (full names) */
272272
extern const int day_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
#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
275280

276281

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.