for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Palmtree\Csv\Normalizer;
class DateTimeNormalizer extends AbstractNormalizer
{
private string $format = 'Y-m-d';
public function format(string $format): self
$this->format = $format;
return $this;
}
protected function getNormalizedValue(string $value): ?\DateTime
return \DateTime::createFromFormat($this->format, $value) ?: null;