<?php

namespace App\ValueObjects;

class Age {
    function __construct(private \DateTime $birthday) {
    }

    public function getAge() : int {
        return (new \DateTime())->diff($this->birthday)->y;
    }

    public function isfullAged() : bool {
        return $this->getAge() >= 18;
    }
}
