Fix calculation of commit age in annotation side bar for < 1 year

parent 0ebdd125
......@@ -69,6 +69,9 @@ static QString ageOfDate(const QDate& date)
return i18ncp("age", "%1 year", "%1 years", ageInYears);
}
int ageInMonths = now.month() - date.month();
if (now.day() < date.day()) {
--ageInMonths;
}
if (ageInMonths < 0) {
ageInMonths += 12;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment