error in file XLDateTime.cpp (line 216)
the error in case the last day of month.
if serial is 30.71232..... it is mean that the 30th day with some time, but if the month have 30 days then
serial -=day and serial = 0.71232
and result.tm_mday will be 0 after that line
The correct code:
while (true) {auto days = daysInMonth(result.tm_mon + 1, 1900 + result.tm_year);if (days >= static_cast<int>(serial)) break; //correct//if (days > serial) break; //errorserial -= days;++result.tm_mon;}
error in file XLDateTime.cpp (line 216) the error in case the last day of month. if serial is 30.71232..... it is mean that the 30th day with some time, but if the month have 30 days then serial -=day and serial = 0.71232 and result.tm_mday will be 0 after that line
The correct code:
while (true) {
auto days = daysInMonth(result.tm_mon + 1, 1900 + result.tm_year);
if (days >= static_cast<int>(serial)) break; //correct
//if (days > serial) break; //error
serial -= days;
++result.tm_mon;
}