private function extractDateTimeFormat($source, $defaultValue = null)
    {
        $dateTimeFormat = $defaultValue;

        if (preg_match('/DateTime<(?<type>[a-zA-Z0-9\,\.\s\-\:\/\\\]+)>/', $source, $matches)) {
            $dateTimeFormat = $matches['type'];
            if (defined('\DateTime::' . $dateTimeFormat)) {
                $dateTimeFormat = constant('\DateTime::' . $dateTimeFormat);
            }
        }

        return $dateTimeFormat;
    }