result = toUnits(seconds,
(seconds == 1) ? SecondKey : SecondsKey);
}
}
else {
FastStringBuffer fsb = new FastStringBuffer();
int days = (int)(millis / ariba.util.core.Date.MillisPerDay);
millis -= days * ariba.util.core.Date.MillisPerDay;
int hours = (int)(millis / ariba.util.core.Date.MillisPerHour);
millis -= hours * ariba.util.core.Date.MillisPerHour;
int minutes = (int)(millis / ariba.util.core.Date.MillisPerMinute);
if (days > 0) {
fsb.append(toUnits(days,
(days == 1) ? DayKey : DaysKey));
if (hours > 0 || minutes > 0) {
fsb.append(", ");
}
}
if (hours > 0) {
fsb.append(toUnits(hours,
(hours == 1) ? HourKey : HoursKey));
if (minutes > 0) {
fsb.append(", ");
}
}
if (minutes > 0) {
fsb.append(toUnits(minutes,
(minutes == 1) ? MinuteKey : MinutesKey));
}
result = fsb.toString();
}
return result;
}