src/DateToDateTime.php
public function setOptions($options)
    {
        $format = null;

        /** @noinspection UnSafeIsSetOverArrayInspection */
        if (isset($options['date_format'])) {
            $format = $options['date_format'];

            unset($options['date_format']);
        } /** @noinspection UnSafeIsSetOverArrayInspection */ elseif (isset($options['format'])) {
            $format = $options['format'];

            unset($options['format']);
        }

        if ($format) {
            $options['format'] = $format;
        }

        parent::setOptions($options);

        return $this;
    }
public function setOptions($options)
    {
        $format = null;

        /** @noinspection UnSafeIsSetOverArrayInspection */
        if (isset($options['date_format'])) {
            $format = $options['date_format'];

            unset($options['date_format']);
        } /** @noinspection UnSafeIsSetOverArrayInspection */ elseif (isset($options['format'])) {
            $format = $options['format'];

            unset($options['format']);
        }

        if ($format) {
            $options['format'] = $format;
        }

        parent::setOptions($options);

        return $this;
    }
public function setOptions ( $ options ) { $ format = null ; /** @noinspection UnSafeIsSetOverArrayInspection */ if ( isset ( $ options [ 'date_format' ] ) ) { $ format = $ options [ 'date_format' ] ; unset ( $ options [ 'date_format' ] ) ; } /** @noinspection UnSafeIsSetOverArrayInspection */ elseif ( isset ( $ options [ 'format' ] ) ) { $ format = $ options [ 'format' ] ; unset ( $ options [ 'format' ] ) ; } if ( $ format ) { $ options [ 'format' ] = $ format ; } parent :: setOptions ( $ options ) ; return $ this ; }
Allow the format key to be format and date_format For consistency with the ZF2 Date Element.

@param array|Traversable $options

@throws \Zend\Filter\Exception\InvalidArgumentException

@return $this
Allow the format key to be format and date_format For consistency with the ZF2 Date Element .