Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 07d7f47

Browse files
committed
Document that datetime year '0' is considered in a recent century, not
just '00'.
1 parent 5e49291 commit 07d7f47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/utils/adt/datetime.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.200 2009/01/01 17:23:49 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.201 2009/03/17 18:35:26 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2264,7 +2264,7 @@ ValidateDate(int fmask, bool is2digits, bool bc, struct pg_tm * tm)
22642264
}
22652265
else if (is2digits)
22662266
{
2267-
/* allow 2-digit input for 1970-2069 AD; 00 is allowed */
2267+
/* allow 2-digit input for 1970-2069 AD; '0' or '00' is allowed */
22682268
if (tm->tm_year < 0) /* just paranoia */
22692269
return DTERR_FIELD_OVERFLOW;
22702270
if (tm->tm_year < 70)

0 commit comments

Comments
 (0)