![JAR search and dependency download from the Maven repository](/logo.png)
com.viaoa.util.xmladapter.OADateXmlAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oa-core Show documentation
Show all versions of oa-core Show documentation
Object Automation library
package com.viaoa.util.xmladapter;
import java.time.Clock;
import java.time.ZoneId;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import com.viaoa.util.OADate;
public class OADateXmlAdapter extends XmlAdapter {
@Override
public String marshal(OADate dt) throws Exception {
if (dt == null) return null;
String s = dt.toString("yyyy-MM-dd");
return s;
}
@Override
public OADate unmarshal(String cal) throws Exception {
if (cal == null) return null;
OADate dt = new OADate(cal, "yyyy-MM-dd");
return dt;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy