Why is "addDays" not working? (QDate) [SOLVED]
-
Hey,
I would like to get the day of week of yesterday.
Therefore I would like to useaddDays
.
It does not matter wheter I add or substract days.
The int yester is always the day of the week from the current day.
What is wrong?Tank you :-)
QDate yesterday= QDate::currentDate(); yesterday.addDays(-1); int yester= yesterday.dayOfWeek(); std::cout << "Yesterday was the " << yester << " day of the week." << std::endl;