Files
gerrit/gerrit-gwtui-common/src/test/java/com
David Pursehouse 1b596afc4d RelativeDateFormatter: Fix bad rounding of "1 year 12 months" to "2 year"
Change I8b1af0e72 fixed rounding of dates, but it only works properly
when the year is already greater than 1.

In the case "1 year 12 months", the year is correctly incremented to 2,
but the label is not adjusted, resulting in "2 year".

This was not noticed during review of I8b1af0e72 because the test that
was added only tests for "4 years 12 months" being rounded to "5 years".

Add an adjustment of the label when the year count is incremented, and
add a test for "1 year 12 months" being correctly rounded to "2 years".

The test is taken from [1] on the jgit project.

[1] https://git.eclipse.org/r/#/c/109895/

Bug: Issue 7357
Change-Id: I9729e6ad82ad31f36d889f59a6663c7c05495b73
2017-10-13 02:31:06 +00:00
..