{@link Converter} implementation for java.util.Datevalues. Converts an strings to and from java.util.Date objects.
shortish has been introduced. Shortish is identical to short but forces the year to be a full four digits. If dateStyle is not set, then dateStyle defaults to shortish. Timezone can be set per web-app in trinidad-config.xml configuration file. If timeZone is not set on the converter, then timezone will be defaulted to the value set in trinidad-config.xml configuration file. If it is not set in the configuration file, then it will be defaulted to GMT.
The converter always allows a level of leniency while converting user input value to date to the following extent.
For example: When pattern on the converter is set to "MMM/d/yyyy" the following inputs are tolerated as valid by the converter.
The methods used for customizing the detail message associated with each id is given below:
The getAsObject() method parses a String into a java.util.Date, according to the following algorithm:
null. Otherwise, trim leading and trailing whitespace before proceeding.null.locale property is not null, use that Locale for managing parsing. Otherwise, use the Locale from the UIViewRoot.pattern has been specified, its syntax must conform the rules specified by java.text.SimpleDateFormat. Such a pattern will be used to parse, and the type, dateStyle, and timeStyle properties will be ignored.pattern has not been specified, parsing will be based on the type property, which expects a date value, a time value, or both. Any date and time values included will be parsed in accordance to the styles specified by dateStyle and timeStyle, respectively.pattern or style and if secondaryPattern is set, re parsers based on the secondaryPattern. Syntax for secondaryPattern must conform to the rules specified by java.text.SimpleDateFormat.java.text.DateFormat The getAsString() method expects a value of type java.util.Date (or a subclass), and creates a formatted String according to the following algorithm:
locale property is not null, use that Locale for managing formatting. Otherwise, use the Locale from the UIViewRoot.pattern has been specified, its syntax must conform the rules specified by java.text.SimpleDateFormat. Such a pattern will be used to format, and the type, dateStyle, and timeStyle properties will be ignored.pattern has not been specified, formatting will be based on the type property, which includes a date value, a time value, or both into the formatted String. Any date and time values included will be formatted in accordance to the styles specified by dateStyle and timeStyle, respectively.secondaryPattern even if set is never used for formatting to a String | |
| |
| |
| |
| |
| |
| |
| |
| |
| |