private static function formatDate($datetime, string $format): ?string
	{
		if (empty($datetime)) {
			return null;
		} elseif ($datetime instanceof DateTimeInterface) {
			$date = $datetime;
		} else {
			$date = DateTime::createFromFormat('U', (string) $datetime);
		}
		return $date->format($format);
	}
private static function formatDate($datetime, string $format): ?string
	{
		if (empty($datetime)) {
			return null;
		} elseif ($datetime instanceof DateTimeInterface) {
			$date = $datetime;
		} else {
			$date = DateTime::createFromFormat('U', (string) $datetime);
		}
		return $date->format($format);
	}
private static function formatDate ( $ datetime , string $ format ) : ? string { if ( empty ( $ datetime ) ) { return null ; } elseif ( $ datetime instanceof DateTimeInterface ) { $ date = $ datetime ; } else { $ date = DateTime :: createFromFormat ( 'U' , ( string ) $ datetime ) ; } return $ date -> format ( $ format ) ; }
Vrati lokalizovany format data
@param DateTimeInterface|int $datetime
@param string $format
@return string|null
Vrati lokalizovany format data