public class TimeFormatter
extends java.lang.Object
Constructor and Description |
---|
TimeFormatter() |
TimeFormatter(java.lang.String hourSuffix,
java.lang.String hoursSuffix,
java.lang.String minuteSuffix,
java.lang.String minutesSuffix,
java.lang.String secondSuffix,
java.lang.String secondsSuffix) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
formatTime(long seconds)
Formats a seconds time value into a brief representation, such as
37 minutes . |
java.lang.String |
formatTime(long seconds,
boolean useUnicodeChars)
Formats a seconds time value into a brief representation, such as
37 minutes . |
public TimeFormatter()
public TimeFormatter(java.lang.String hourSuffix, java.lang.String hoursSuffix, java.lang.String minuteSuffix, java.lang.String minutesSuffix, java.lang.String secondSuffix, java.lang.String secondsSuffix)
public java.lang.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 java.lang.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.