1 Commits
Author SHA1 Message Date
Dave Mc Nicoll ec061bcd9f - Fixed ageAt method 2026-10-26 12:05:48 +00:00
+1 -1
View File
@@ -58,7 +58,7 @@ trait DatetimeTrait
public function ageAt(null|\DateTime $dateTime) : int public function ageAt(null|\DateTime $dateTime) : int
{ {
return (int) ( (int) ($dateTime ?: new DateTime())->format('Ymd') - (int) $this->format('Ymd') ) / 10000; return (int) (( (int) ($dateTime ?: new DateTime())->format('Ymd') - (int) $this->format('Ymd') ) / 10000);
} }
public function jsonSerialize(): mixed public function jsonSerialize(): mixed