Package org.jets3t.service.utils
Class TimeFormatter
java.lang.Object
org.jets3t.service.utils.TimeFormatter
Formats time values into human-readable strings.
- Author:
- James Murty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformatTime
(long seconds) Formats a seconds time value into a brief representation, such as37 minutes
.formatTime
(long seconds, boolean useUnicodeChars) Formats a seconds time value into a brief representation, such as37 minutes
.
-
Constructor Details
-
TimeFormatter
public TimeFormatter() -
TimeFormatter
-
-
Method Details
-
formatTime
Formats a seconds time value into a brief representation, such as37 minutes
. Unicode characters are used to represent 1/4, 1/2 and 3/4 fractions.- Parameters:
seconds
- the number of seconds time value.- Returns:
- a representation of the time.
-
formatTime
Formats a seconds time value into a brief representation, such as37 minutes
.- Parameters:
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.- Returns:
- a representation of the time.
-