Skip to content

Commit 2751740

Browse files
committed
Add additional C comments for to_date/to_char() fixes.
1 parent 633f2fb commit 2751740

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/utils/adt/formatting.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3504,8 +3504,10 @@ do_to_timestamp(text *date_txt, text *fmt,
35043504
if (tmfc.bc)
35053505
tmfc.cc = -tmfc.cc;
35063506
if (tmfc.cc >= 0)
3507+
/* +1 becuase 21st century started in 2001 */
35073508
tm->tm_year = (tmfc.cc - 1) * 100 + 1;
35083509
else
3510+
/* +1 because year == 599 is 600 BC */
35093511
tm->tm_year = tmfc.cc * 100 + 1;
35103512
}
35113513

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy