18declare(strict_types=1);
28 public const DOT =
'.';
33 public const DAY =
'd';
86 if (!in_array($entry, self::TOKENS,
true)) {
87 throw new \InvalidArgumentException(
"not a valid token for date-format", 1);
106 return implode(
'', $this->format);
114 public function applyTo(\DateTimeImmutable $datetime): string
116 return $datetime->format($this->
toString());