|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.util.date.DateUtils
Contains Date related formatters and utility methods.
| Field Summary | |
static DateFormat |
DEFAULT_DATE_TIME_FORMATTER
The default DateFormat to format date/time objects.
|
private static NumberFormat |
DEFAULT_NUMBER_FORMAT
The internal default formatter for numeric duration values |
| Constructor Summary | |
DateUtils()
|
|
| Method Summary | |
static String |
formatDuration(double duration)
Formats the specified duration in milliseconds to a human readble format. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final DateFormat DEFAULT_DATE_TIME_FORMATTER
The default DateFormat to format date/time objects.
private static final NumberFormat DEFAULT_NUMBER_FORMAT
The internal default formatter for numeric duration values
| Constructor Detail |
public DateUtils()
| Method Detail |
public static String formatDuration(double duration)
Formats the specified duration in milliseconds to a human readble format. If the value is below 60 seconds it will be formatted as 'xx.xs' where 'xx' denotes the number of seconds and 's' abbreviates the second unit. If the value is above 60 seconds it will be formatted as 'yy:xxm' where 'yy' denotes the number of minutes, 'xx' the number of seconds and 'm' abbreviates the minute unit.
duration - the number of elapsed milliseconds
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||