public class DateConverter extends Object implements org.apache.commons.beanutils.Converter
Constructor and Description |
---|
DateConverter() |
Modifier and Type | Method and Description |
---|---|
Object |
convert(Class type,
Object value)
Convert a date to a String and a String to a Date
|
protected Object |
convertToDate(Class type,
Object value,
String pattern)
Convert a String to a Date with the specified pattern.
|
protected Object |
convertToString(Class type,
Object value)
Convert a java.util.Date to a String
|
public Object convert(Class type, Object value)
convert
in interface org.apache.commons.beanutils.Converter
type
- String, Date or Timestampvalue
- value to convertprotected Object convertToDate(Class type, Object value, String pattern)
type
- Stringvalue
- value of Stringpattern
- date pattern to parse withCopyright © 2015. All rights reserved.