public abstract class DateConverter extends Object implements org.apache.wicket.util.convert.IConverter<Date>
Converters of this class are best suited for per-component use.
| Constructor and Description |
|---|
DateConverter(boolean applyTimeZoneDifference)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
Date |
convertToObject(String value,
Locale locale) |
String |
convertToString(Date value,
Locale locale) |
boolean |
getApplyTimeZoneDifference()
Gets whether to apply the time zone difference when interpreting dates.
|
protected TimeZone |
getClientTimeZone()
Gets the client's time zone.
|
abstract String |
getDatePattern(Locale locale) |
protected abstract org.joda.time.format.DateTimeFormatter |
getFormat(Locale locale) |
protected org.joda.time.DateTimeZone |
getTimeZone()
Gets the server time zone.
|
public DateConverter(boolean applyTimeZoneDifference)
applyTimeZoneDifference - whether to apply the difference in time zones between client and serverpublic Date convertToObject(String value, Locale locale)
convertToObject in interface org.apache.wicket.util.convert.IConverter<Date>IConverter.convertToObject(java.lang.String,
java.util.Locale)public String convertToString(Date value, Locale locale)
convertToString in interface org.apache.wicket.util.convert.IConverter<Date>IConverter.convertToString(java.lang.Object,
java.util.Locale)public final boolean getApplyTimeZoneDifference()
public abstract String getDatePattern(Locale locale)
locale - The locale used to convert the valueprotected TimeZone getClientTimeZone()
protected abstract org.joda.time.format.DateTimeFormatter getFormat(Locale locale)
locale - The locale used to convert the valueprotected org.joda.time.DateTimeZone getTimeZone()
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.