|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.datetime.DateConverter
public abstract class DateConverter
Base class for Joda Time based date converters. It contains the logic to parse and format, optionally taking the time zone difference between clients and the server into account.
Converters of this class are best suited for per-component use.
| Constructor Summary | |
|---|---|
DateConverter(boolean applyTimeZoneDifference)
Construct. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateConverter(boolean applyTimeZoneDifference)
applyTimeZoneDifference - whether to apply the difference in time zones between client and server| Method Detail |
|---|
public 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 value
protected TimeZone getClientTimeZone()
protected abstract org.joda.time.format.DateTimeFormatter getFormat(Locale locale)
locale - The locale used to convert the value
protected org.joda.time.DateTimeZone getTimeZone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||