summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2011-10-21 00:23:57 +0200
committerRobin Rosenberg <robin.rosenberg@dewire.com>2011-10-26 23:15:28 +0200
commit57bdb0487328b5ae46a255caa09360740ee28a17 (patch)
treeab6dbd1932f87be089dc6f4a6f6e026cefff569b /org.eclipse.jgit.test/tst
parent6baf0cb9564d1df512e1f47c2d65cfa927faf95f (diff)
downloadjgit-57bdb0487328b5ae46a255caa09360740ee28a17.tar.gz
jgit-57bdb0487328b5ae46a255caa09360740ee28a17.zip
Cosmetic adjustment of relative date format, do not display "0 months"
Though it may seem less precise, "0 months" looks bad and the reference Git implementation also does not display "0 months" Change-Id: I488e9c97656f9941788ae88d7c5c1562ab6c26f0
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RelativeDateFormatterTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RelativeDateFormatterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RelativeDateFormatterTest.java
index 18d4e1060f..84b35b4dcd 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RelativeDateFormatterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RelativeDateFormatterTest.java
@@ -119,10 +119,10 @@ public class RelativeDateFormatterTest {
@Test
public void testFormatYearsMonths() {
- assertFormat(366, DAY_IN_MILLIS, "1 year, 0 month ago");
+ assertFormat(366, DAY_IN_MILLIS, "1 year ago");
assertFormat(380, DAY_IN_MILLIS, "1 year, 1 month ago");
assertFormat(410, DAY_IN_MILLIS, "1 year, 2 months ago");
- assertFormat(2, YEAR_IN_MILLIS, "2 years, 0 month ago");
+ assertFormat(2, YEAR_IN_MILLIS, "2 years ago");
assertFormat(1824, DAY_IN_MILLIS, "4 years, 12 months ago");
}