All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fincatto.documentofiscal.transformers.DFLocalTimeTransformer Maven / Gradle / Ivy

There is a newer version: 4.0.75
Show newest version
package com.fincatto.documentofiscal.transformers;

import org.simpleframework.xml.transform.Transform;

import java.time.LocalTime;
import java.time.format.DateTimeFormatter;

public class DFLocalTimeTransformer implements Transform {

    @Override
    public LocalTime read(final String time) {
        return LocalTime.from(DateTimeFormatter.ofPattern("HH:mm:ss").parse(time));
    }

    @Override
    public String write(final LocalTime localTime) {
        return DateTimeFormatter.ofPattern("HH:mm:ss").format(localTime);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy