Class SimpleDateConverter

  • All Implemented Interfaces:
    org.springframework.core.convert.converter.Converter<java.lang.String,​java.util.Date>

    public class SimpleDateConverter
    extends java.lang.Object
    implements org.springframework.core.convert.converter.Converter<java.lang.String,​java.util.Date>
    A Converter which uses a given DateFormat to convert a String to a Date. By default the DateFormat is derived from the given locale using DateFormat.DEFAULT. You can specify the date format pattern by providing the dateformat property.
    Since:
    3.0.0
    Author:
    Oliver Libutzki <[email protected]>
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleDateConverter​(java.text.DateFormat dateFormat)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Date convert​(java.lang.String source)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleDateConverter

        public SimpleDateConverter​(java.text.DateFormat dateFormat)
    • Method Detail

      • convert

        public java.util.Date convert​(java.lang.String source)
        Specified by:
        convert in interface org.springframework.core.convert.converter.Converter<java.lang.String,​java.util.Date>