mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-21 22:33:54 -07:00
* do not save a const reference to the user data in the info dialog
* cmake format
(cherry picked from commit 6be9cec6e2)
8 lines
286 B
C
8 lines
286 B
C
#include <QDateTime>
|
|
|
|
inline static QPair<int, int> getDaysAndYearsBetween(const QDate &then, const QDate &now)
|
|
{
|
|
int years = now.addDays(1 - then.dayOfYear()).year() - then.year(); // there is no yearsTo
|
|
int days = then.addYears(years).daysTo(now);
|
|
return {days, years};
|
|
}
|