protected static function parseDate(
        string $date,
        string $format = null,
        string $output = null
    ) {
        $d = \DateTime::createFromFormat($format ?? static::DATE_FORMAT, $date);
        return ($d ? $d->format($output ?? 'Y-m-d') : null);
    }