Content-Length: 261319 | pFad | http://github.com/postgrespro/postgres/commit/171c377a0abe12d1418540dc154feccd9355995e

3F C comment: mention why the Gregorian calendar is used pre-1582 · postgrespro/postgres@171c377 · GitHub
Skip to content

Commit 171c377

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

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
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/171c377a0abe12d1418540dc154feccd9355995e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy