Improved date displaying.

This commit is contained in:
Christian P. MOMON 2021-02-05 03:42:27 +01:00
parent eab4316102
commit 39ffde8632

View file

@ -338,9 +338,16 @@ public class StatoolInfosUtils
if (period.getYears() == 0) if (period.getYears() == 0)
{ {
if (period.getMonths() == 0) if (period.getMonths() == 0)
{
if (period.getDays() <= 1)
{
result = String.format("%d jour", period.getDays());
}
else
{ {
result = String.format("%d jours", period.getDays()); result = String.format("%d jours", period.getDays());
} }
}
else else
{ {
result = String.format("%d mois", period.getMonths()); result = String.format("%d mois", period.getMonths());