public class TimeFormatter extends Object
Constructor | Description |
---|---|
TimeFormatter() |
|
TimeFormatter(String hourSuffix,
String hoursSuffix,
String minuteSuffix,
String minutesSuffix,
String secondSuffix,
String secondsSuffix) |
Modifier and Type | Method | Description |
---|---|---|
String |
formatTime(long seconds) |
Formats a seconds time value into a brief representation, such as
37 minutes . |
String |
formatTime(long seconds,
boolean useUnicodeChars) |
Formats a seconds time value into a brief representation, such as
37 minutes . |
public String formatTime(long seconds)
37 minutes
.
Unicode characters are used to represent 1/4, 1/2 and 3/4 fractions.seconds
- the number of seconds time value.public String formatTime(long seconds, boolean useUnicodeChars)
37 minutes
.seconds
- the number of seconds time value.useUnicodeChars
- if true, special unicode characters are used to represent 1/4, 1/2 and 3/4 fractions.
If false, the fractions are displayed in standard text.