Tools/Mapper/Mapper.php
public function dateFromFormat($format, $date)
    {
        if (!empty($format) && !empty($date)) {
            return \DateTime::createFromFormat($format, $date);
        }
    }
public function dateFromFormat($format, $date)
    {
        if (!empty($format) && !empty($date)) {
            return \DateTime::createFromFormat($format, $date);
        }
    }
public function dateFromFormat ( $ format , $ date ) { if ( ! empty ( $ format ) && ! empty ( $ date ) ) { return \ DateTime :: createFromFormat ( $ format , $ date ) ; } }
Convert a formatted string to a date.

The portions of the generated time not provided in format, will be set to corresponding values from the Unix epoch.
Ex: dateFromFormat('d/m/Y', '23/03/2018').

@param string $format
@param string $date

@return bool|\DateTime
Convert a formatted string to a date .