|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TimeOfDayFormatter
Provides methods for formatting a TimeOfDay
object as a
human-readable string.
The following notation will be used:
hh : | The hour of the time written with two digits. A 24-hour scale is used, so this will be in the range 00-23. | mm : | The minute of the time written with two digits; in the range 00-59. | ss : | The second of the time written with two digits; in the range 00-59. | nnn : | The millisecond of the time written with three digits; in the range 000-999. |
There are three standard formatters: ISO, EUR and US, provided by
Time.iso()
, Time.eur()
and Time.us()
, respectively.
The ISO formatter formats timestamps according to the ISO-8601 standard, the
EUR formatter formats timestamps according to some de-facto European
standard, and the US formatter formats timestamps according to US standards.
In the case of formatting a time of day, all these formatters coincide, but
they are still separated to follow the pattern of TimeFormatter
and DayDateFormatter
.
Method Summary | |
---|---|
String |
formatCompactLongTime()
Formats the time of day as a compact string, with no delimiters between the different parts of the time. |
String |
formatCompactShortTime()
Formats the time of day as a compact string, with no delimiters between the different parts of the time. |
String |
formatCompactTime()
Formats the time of day as a compact string, with no delimiters between the different parts of the time. |
String |
formatLongTime()
Formats the time of day as a string, with delimiters between the different parts of this time. |
String |
formatShortTime()
Formats the time of day as a string, with delimiters between the different parts of this time. |
String |
formatTime()
Formats the time of day as a string, with delimiters between the different parts of this time. |
Method Detail |
---|
String formatCompactTime()
Formatter | Format |
---|---|
ISO | hhmmss |
EUR | hhmmss |
US | hhmmss |
String formatCompactLongTime()
Formatter | Format |
---|---|
ISO | hhmmssnnn |
EUR | hhmmssnnn |
US | hhmmssnnn |
String formatCompactShortTime()
Formatter | Format |
---|---|
ISO | hhmm |
EUR | hhmm |
US | hhmm |
String formatTime()
Formatter | Format |
---|---|
ISO | hh:mm:ss |
EUR | hh:mm:ss |
US | hh:mm:ss |
String formatLongTime()
Formatter | Format |
---|---|
ISO | hh:mm:ss.nnn |
EUR | hh:mm:ss.nnn |
US | hh:mm:ss.nnn |
String formatShortTime()
Formatter | Format |
---|---|
ISO | hh:mm |
EUR | hh:mm |
US | hh:mm |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |