From 39ffde86326699aa1b5c678ee06d31e017aa456b Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Fri, 5 Feb 2021 03:42:27 +0100 Subject: [PATCH] Improved date displaying. --- src/fr/devinsy/statoolinfos/core/StatoolInfosUtils.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/fr/devinsy/statoolinfos/core/StatoolInfosUtils.java b/src/fr/devinsy/statoolinfos/core/StatoolInfosUtils.java index fb07214..c20bf32 100644 --- a/src/fr/devinsy/statoolinfos/core/StatoolInfosUtils.java +++ b/src/fr/devinsy/statoolinfos/core/StatoolInfosUtils.java @@ -339,7 +339,14 @@ public class StatoolInfosUtils { if (period.getMonths() == 0) { - result = String.format("%d jours", period.getDays()); + if (period.getDays() <= 1) + { + result = String.format("%d jour", period.getDays()); + } + else + { + result = String.format("%d jours", period.getDays()); + } } else {