Updated DateTime types.

This commit is contained in:
2026-01-13 10:48:04 +01:00
parent 708948fa15
commit 52a4997497
8 changed files with 21 additions and 33 deletions
+3 -3
View File
@@ -38,9 +38,9 @@ class RoomPrice
return $this;
}
public function getDate(): ?\DateTime
public function getDate(): ?\DateTimeImmutable
{
return new \DateTime($this->date);
return new \DateTimeImmutable($this->date);
}
public function getDateString(): ?string
@@ -48,7 +48,7 @@ class RoomPrice
return $this->date;
}
public function setDate(\DateTime $date): static
public function setDate(\DateTimeInterface $date): static
{
$this->date = $date->format('Y-m-d');