Files
watchstate/src/Libs/Extends/Date.php
Abdulmhsen B. A. A 1e13cc4bf1 Initial commit.
2022-02-10 16:41:48 +03:00

24 lines
435 B
PHP

<?php
declare(strict_types=1);
namespace App\Libs\Extends;
use DateTimeImmutable;
use DateTimeInterface;
use JsonSerializable;
use Stringable;
final class Date extends DateTimeImmutable implements Stringable, JsonSerializable
{
public function __toString(): string
{
return $this->format(DateTimeInterface::ATOM);
}
public function jsonSerialize(): string
{
return $this->__toString();
}
}