| java.lang.Object org.apache.wicket.datetime.DateConverter org.apache.wicket.datetime.PatternDateConverter
PatternDateConverter | public class PatternDateConverter extends DateConverter (Code) | | Date converter that uses Joda Time and can be configured to take the time
zone difference between clients and server into account. This converter is
hard coded to use the provided custom date pattern, no matter what current
locale is used. See
SimpleDateFormat for available patterns.
This converter is especially suited on a per-component base.
See Also: SimpleDateFormat See Also: StyleDateConverter See Also: DateTextField See Also: DateTime See Also: DateTimeFormat See Also: DateTimeZone author: eelcohillenius |
Constructor Summary | |
public | PatternDateConverter(String datePattern, boolean applyTimeZoneDifference) Construct.
When applyTimeZoneDifference is true, the current time is applied on the
parsed date, and the date will be corrected for the time zone difference
between the server and the client. |
PatternDateConverter | public PatternDateConverter(String datePattern, boolean applyTimeZoneDifference)(Code) | | Construct.
When applyTimeZoneDifference is true, the current time is applied on the
parsed date, and the date will be corrected for the time zone difference
between the server and the client. For instance, if I'm in Seattle and
the server I'm working on is in Amsterdam, the server is 9 hours ahead.
So, if I'm inputting say 12/24 at a couple of hours before midnight, at
the server it is already 12/25. If this boolean is true, it will be
transformed to 12/25, while the client sees 12/24.
Parameters: datePattern - The pattern to use. Must be not null. SeeSimpleDateFormat for available patterns. Parameters: applyTimeZoneDifference - whether to apply the difference in time zones between clientand server throws: IllegalArgumentException - in case the date pattern is null |
getDatePattern | final public String getDatePattern()(Code) | | Gets the optional date pattern.
datePattern |
getFormat | protected DateTimeFormatter getFormat()(Code) | | formatter The formatter for the current conversion |
|
|