|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DayDateFormatter
Provides methods for formatting a DayDate object as a human-readable
string.
The following notation will be used:
YYYY: | The year written with four digits, e.g. 1066, 1969, 2011 | YY: | The year written with two digits, e.g. 66, 69, 11 | MM: | The month written with two digits, e.g. 02 for February and 10 for October | DD: | The day of the month written with two digits, e.g. 02, 15, 31 |
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.
The main difference between how these these formatters format dates is
summarized here:
| ISO: | YYYY-MM-DD, YYYYMMDD |
EUR: | DD.MM.YYYY, DDMMYYYY |
US: | MM/DD/YYYY, MMDDYYYY |
| Method Summary | |
|---|---|
String |
formatCompactDate()
Formats the date as a compact string, with no delimiters between year, month and date. |
String |
formatCompactShortDate()
Formats the date as a compact string, with no delimiters between year, month and date. |
String |
formatDate()
Formats the date as a string, with delimiters between year, month and day. |
String |
formatShortDate()
Formats the date in a shorter way. |
| Method Detail |
|---|
String formatCompactDate()
| Formatter | Format |
|---|---|
| ISO | YYYYMMDD |
| EUR | DDMMYYYY |
| US | MMDDYYYY |
String formatCompactShortDate()
| Formatter | Format |
|---|---|
| ISO | YYMMDD |
| EUR | DDMMYY |
| US | MMDDYY |
String formatDate()
| Formatter | Format |
|---|---|
| ISO | YYYY-MM-DD |
| EUR | DD.MM.YYYY |
| US | MM/DD/YYYY |
String formatShortDate()
| Formatter | Format |
|---|---|
| ISO | YY-MM-DD |
| EUR | DD.MM.YY |
| US | MM/DD/YY |
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||