*** src/backend/utils/adt/datetime.c.orig Thu Sep 25 10:23:13 2003 --- src/backend/utils/adt/datetime.c Fri Nov 14 19:22:47 2003 *************** *** 2553,2561 **** break; case (DTK_M(MONTH)): ! /* Must be at second field of MM-DD-YY */ ! *tmask = DTK_M(DAY); ! tm->tm_mday = val; break; case (DTK_M(YEAR) | DTK_M(MONTH) | DTK_M(DAY)): --- 2553,2577 ---- break; case (DTK_M(MONTH)): ! /* ! * There are two possibilities: we are at second field of ! * MM-DD-YY (with DateOrder MDY), or we are at the first ! * numeric field of a date that included a textual month name. ! * We want to support the variants MON-DD-YYYY, DD-MON-YYYY, ! * and YYYY-MON-DD as unambiguous inputs. We will also accept ! * MON-DD-YY or DD-MON-YY in either DMY or MDY modes, as well ! * as YY-MON-DD in YMD mode. Hence: ! */ ! if (flen >= 3 || DateOrder == DATEORDER_YMD) ! { ! *tmask = DTK_M(YEAR); ! tm->tm_year = val; ! } ! else ! { ! *tmask = DTK_M(DAY); ! tm->tm_mday = val; ! } break; case (DTK_M(YEAR) | DTK_M(MONTH) | DTK_M(DAY)):