if (dtSrc > MAX_DATE || dtSrc < MIN_DATE) // about year 100 to about 9999
return FALSE;
- long nDays; // Number of days since Dec. 30, 1899
long nDaysAbsolute; // Number of days since 1/1/0
long nSecsInDay; // Time in seconds since midnight
long nMinutesInDay; // Minutes in day
double dblDate = dtSrc; // tempory serial date
- // If a valid date, then this conversion should not overflow
- nDays = (long)dblDate;
-
// Round to the second
dblDate += ((dtSrc > 0.0) ? HALF_SECOND : -HALF_SECOND);
// Month number always >= n/32, so save some loop time */
for (tmDest.tm_mon = (n4Day >> 5) + 1;
- n4Day > rgMonthDays[tmDest.tm_mon]; tmDest.tm_mon++);
+ n4Day > rgMonthDays[tmDest.tm_mon]; tmDest.tm_mon++)
+ ;
tmDest.tm_mday = (int)(n4Day - rgMonthDays[tmDest.tm_mon-1]);