public class PatternDateConverter extends DateConverter
SimpleDateFormat
for available
patterns.
This converter is especially suited on a per-component base.
SimpleDateFormat
,
StyleDateConverter
,
DateTextField
,
DateTime
,
DateTimeFormat
,
DateTimeZone
,
Serialized FormConstructor and Description |
---|
PatternDateConverter(String datePattern,
boolean applyTimeZoneDifference)
Construct.
|
Modifier and Type | Method and Description |
---|---|
String |
getDatePattern(Locale locale)
Gets the optional date pattern.
|
protected org.joda.time.format.DateTimeFormatter |
getFormat(Locale locale) |
convertToObject, convertToString, getApplyTimeZoneDifference, getClientTimeZone, getTimeZone
public PatternDateConverter(String datePattern, boolean applyTimeZoneDifference)
datePattern
- The pattern to use. Must be not null. See SimpleDateFormat
for available
patterns.applyTimeZoneDifference
- whether to apply the difference in time zones between client and serverIllegalArgumentException
- in case the date pattern is nullpublic final String getDatePattern(Locale locale)
getDatePattern
in class DateConverter
locale
- The locale used to convert the valueprotected org.joda.time.format.DateTimeFormatter getFormat(Locale locale)
getFormat
in class DateConverter
locale
- The locale used to convert the valueCopyright © 2006–2021 Apache Software Foundation. All rights reserved.