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

com.jslsolucoes.spring.converter.LocalDateConverter Maven / Gradle / Ivy

There is a newer version: 1.0.34
Show newest version
package com.jslsolucoes.spring.converter;

import java.time.LocalDate;
import java.time.LocalDateTime;

import org.springframework.core.convert.converter.Converter;

public class LocalDateConverter implements Converter {
    
    private LocalDateTimeConverter localDateTimeConverter;
    
    public LocalDateConverter(LocalDateTimeConverter localDateTimeConverter) {
	this.localDateTimeConverter = localDateTimeConverter;
    }

    @Override
    public LocalDate convert(String value) {
	LocalDateTime localDateTime = localDateTimeConverter.convert(value);
	if (localDateTime != null) {
	    return localDateTime.toLocalDate();
	}
	return null;
    }
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy