// in the fine tradition of ANSI C we use our equivalent of (time_t)-1 to
// indicate an invalid wxDateTime object
+#ifdef __WIN16__
+static const wxDateTime gs_dtDefault;
+#else
static const wxDateTime gs_dtDefault = wxLongLong((long)ULONG_MAX, ULONG_MAX);
+#endif
const wxDateTime& wxDefaultDateTime = gs_dtDefault;
// but we already have a month - maybe we guessed wrong?
if ( !haveDay )
{
- // no need to check in month range as always < 12, but
+ // no need to check in month range as always < 12, but
// the days are counted from 1 unlike the months
day = (wxDateTime_t)mon + 1;
haveDay = TRUE;
// could possible be the year (doesn't the year come
// before the month in the japanese format?) (FIXME)
break;
- }
+ }
}
mon = mon2;
mon = (wxDateTime::Month)(day - 1);
// we're in the current year then
- if ( year <= GetNumOfDaysInMonth(Inv_Year, mon) )
+ if ( (year > 0) &&
+ (unsigned)year <= GetNumOfDaysInMonth(Inv_Year, mon) )
{
day = year;