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

com.haoxuer.discover.web.converter.DateConverter Maven / Gradle / Ivy

There is a newer version: 3.3.18-20230117
Show newest version
package com.haoxuer.discover.web.converter;

import com.haoxuer.discover.web.conver.DateConver;
import java.util.Date;
import org.springframework.core.convert.converter.Converter;
import org.springframework.lang.Nullable;
import org.springframework.util.StringUtils;

public class DateConverter implements Converter {
  @Nullable
  @Override
  public Date convert(String text) {
    if (StringUtils.hasText(text)) {
      return DateConver.getDefault().conver(text);
    } else {
      return null;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy