Class DateFormat
java.lang.Object
com.tccc.kos.commons.util.format.date.DateFormat
- Direct Known Subclasses:
D_ddMMyy,D_MMddyy,D_yyyyMMdd
Describes a date format for both Java and JavaScript. This includes a hint
about the order of month/day/year, which allows editors to generate the
correct options for the format.
Date formatting characters are:
y = year-of-era M = month-of-year d = day-of-month
- Since:
- 1.0
- Version:
- 2023-02-24
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDateFormat(String id, String format, String order) Creates a new date format with the specified properties. -
Method Summary
-
Constructor Details
-
DateFormat
Creates a new date format with the specified properties.- Parameters:
id- the ID of the formatformat- format stringorder- three character string using 'm', 'd', and 'y' to indicate the correct ordering
-
-
Method Details
-
getId
Returns the ID of the format, which is used to identify and select the format. This should not be a display value. A localization key should be used to convert this to a display string. -
getFormat
Returns the format string for this date format. -
getOrder
Returns the order of month/day/year in this format. This provides a hint to tooling, such as editors, so they can match the format.
-