com.greenpepper.extensions.fit.DateConverter Maven / Gradle / Ivy
package com.greenpepper.extensions.fit;
import java.util.Date;
import com.greenpepper.converter.AbstractTypeConverter;
/**
* DateConverter class.
*
* @author oaouattara
* @version $Id: $Id
*/
public class DateConverter extends AbstractTypeConverter
{
/** {@inheritDoc} */
@SuppressWarnings("deprecation")
protected Object doConvert(String value)
{
return new Date(Date.parse(value));
}
/** {@inheritDoc} */
public boolean canConvertTo(Class type)
{
return Date.class.isAssignableFrom(type);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy