Class DateTransformer

  • All Implemented Interfaces:
    Transformer, Validator

    public class DateTransformer
    extends DateTransformerBase

    A specialized transformer that transforms strings into date objects.

    Most of the required functionality is already implemented by the base class. This class only creates an appropriate DateFormat object that supports parsing dates.

    For the documentation of the supported properties and error messages refer to the super class.

    Version:
    $Id: DateTransformer.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Constructor Detail

      • DateTransformer

        public DateTransformer()
    • Method Detail

      • createFormat

        protected DateFormat createFormat​(Locale locale,
                                          int style,
                                          org.apache.commons.configuration.Configuration config)
        Returns the DateFormat to be used by this transformer. This implementation returns a format object for processing dates.
        Specified by:
        createFormat in class DateTransformerBase
        Parameters:
        locale - the locale
        style - the style to be used
        config - the configuration with the properties
        Returns:
        the format object to be used