- Fixed ageAt method
This commit is contained in:
1 parent
9855a00451
commit
ec061bcd9f
1 file changed
+1
-1
@@ -58,7 +58,7 @@ trait DatetimeTrait
|
||||
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user