public function serialize($value) : string
{
if (!$value instanceof \DateTimeInterface) {
throw InvalidValueException::valueDoesNotMatchType($this, $value);
}
return (string) $value->format($this->format);
}