Do not display 0 minute
in the uptime if another period unit has value
This commit is contained in:
parent
80d0960c4d
commit
5590cd007a
1 changed files with 9 additions and 3 deletions
|
@ -596,10 +596,16 @@ public final class RenderUtils {
|
|||
properties.getProperty("hours", " hours ")));
|
||||
}
|
||||
|
||||
if (minutes == 0) {
|
||||
if (years == 0 && months == 0 && weeks == 0 && days == 0 && hours == 0) {
|
||||
sb.append(0).append(properties.getProperty("minute", " minute"));
|
||||
}
|
||||
} else {
|
||||
sb.append(minutes).append(plural(minutes, properties.getProperty("minute", " minute"),
|
||||
properties.getProperty("minutes", " minutes")));
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
return sb.toString().trim();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue