org.aarboard.nextcloud.api.utils.LocalDateXmlAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nextcloud-api Show documentation
Show all versions of nextcloud-api Show documentation
Java api library to access nextcloud features from java applications
The newest version!
package org.aarboard.nextcloud.api.utils;
import jakarta.xml.bind.annotation.adapters.XmlAdapter;
import java.time.LocalDate;
public class LocalDateXmlAdapter extends XmlAdapter
{
@Override
public String marshal(LocalDate date)
{
return date.toString();
}
@Override
public LocalDate unmarshal(String date)
{
return LocalDate.parse(date.substring(0, 10));
}
}