Files
tables/src/formats/DateFormat.php
2024-08-29 11:49:46 +03:00

17 lines
311 B
PHP

<?php
namespace Itguild\Tables\formats;
use DateTimeImmutable;
class DateFormat extends BaseFormat
{
/**
* @throws \Exception
*/
static function fetch(?string $data, string $options = ""): ?string
{
return (new DateTimeImmutable($data ?? ""))->format($options) ?? null;
}
}