summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e72263a)
raw | patch | inline | side by side (parent: e72263a)
author | David Reiss <dreiss@facebook.com> | |
Thu, 27 Aug 2009 23:39:38 +0000 (16:39 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 28 Aug 2009 02:59:00 +0000 (19:59 -0700) |
Previously, a commit from 1 year and 7 months ago would display as
"2 years, 7 months ago".
Signed-off-by: David Reiss <dreiss@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
"2 years, 7 months ago".
Signed-off-by: David Reiss <dreiss@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
date.c | patch | blob | history |
index 409a17d46424083b62f21e7e278393cee7bfa080..f011692c2f9f06e2356c2256ff8f1b496a1af2d5 100644 (file)
--- a/date.c
+++ b/date.c
}
/* Give years and months for 5 years or so */
if (diff < 1825) {
- unsigned long years = (diff + 183) / 365;
+ unsigned long years = diff / 365;
unsigned long months = (diff % 365 + 15) / 30;
int n;
n = snprintf(timebuf, sizeof(timebuf), "%lu year%s",