- wxASSERT_MSG( isDay, _T("logic error") );
-
- if ( haveDay )
- {
- // may be were mistaken when we found it for the first
- // time? may be it was a month or year instead?
- //
- // this ability to "backtrack" allows us to correctly parse
- // both things like 01/13 and 13/01 - but, of course, we
- // still can't resolve the ambiguity in 01/02 (it will be
- // Feb 1 for us, not Jan 2 as americans might expect!)
- if ( (day <= 12) && !haveMon )
- {
- // exchange day and month
- mon = (wxDateTime::Month)day;
-
- haveMon = TRUE;
- }
- else if ( !haveYear )
- {
- // exchange day and year
- year = day;
-
- haveYear = TRUE;
- }
- }
-
- haveDay = TRUE;