src/Charcoal/Property/DateTimeProperty.php
public function displayVal($val, array $options = [])
    {
        $val = $this->dateTimeVal($val);
        if ($val === null) {
            return '';
        }

        if (isset($options['format'])) {
            $format = $options['format'];
        } else {
            $format = $this->format();
        }

        return $val->format($format);
    }
public function displayVal($val, array $options = [])
    {
        $val = $this->dateTimeVal($val);
        if ($val === null) {
            return '';
        }

        if (isset($options['format'])) {
            $format = $options['format'];
        } else {
            $format = $this->format();
        }

        return $val->format($format);
    }
public function displayVal ( $ val , array $ options = [ ] ) { $ val = $ this -> dateTimeVal ( $ val ) ; if ( $ val === null ) { return '' ; } if ( isset ( $ options [ 'format' ] ) ) { $ format = $ options [ 'format' ] ; } else { $ format = $ this -> format ( ) ; } return $ val -> format ( $ format ) ; }
Format `DateTime` to string.

> Warning: Passing a value as a parameter sets this value in the objects (calls setVal())

@param  mixed $val     The value to to convert for display.
@param  array $options Optional display options.
@see AbstractProperty::displayVal()
@return string
Format DateTime to string .