public static function parseDate($sourceDate, $sourceFormat, $destinationFormat) {
        $myDateTime = \DateTime::createFromFormat($sourceFormat, $sourceDate);

        if ($myDateTime === false) {
            throw new Exception("Date " . $sourceDate . " cannot be parsed with format \"" . $sourceFormat . "\"");
        }

        return $myDateTime->format($destinationFormat);
    }