column format
This commit is contained in:
17
src/formats/DateFormat.php
Normal file
17
src/formats/DateFormat.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user