com.newegg.marketplace.sdk.common.DateAdapter Maven / Gradle / Ivy
package com.newegg.marketplace.sdk.common;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.xml.bind.annotation.adapters.XmlAdapter;
public class DateAdapter extends XmlAdapter {
private final DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy");
@Override
public Date unmarshal(String v) throws Exception {
return dateFormat.parse(v);
}
@Override
public String marshal(Date v) throws Exception {
return dateFormat.format(v);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy