public function getAge()
    {
        if (!$this->hasDateOfBirth()) {
            return 0;
        }

        $currentTimestamp = $GLOBALS['EXEC_TIME'];
        $birthTimestamp = $this->getDateOfBirth();

        $currentYear = (int)strftime('%Y', $currentTimestamp);
        $currentMonth = (int)strftime('%m', $currentTimestamp);
        $currentDay = (int)strftime('%d', $currentTimestamp);
        $birthYear = (int)strftime('%Y', $birthTimestamp);
        $birthMonth = (int)strftime('%m', $birthTimestamp);
        $birthDay = (int)strftime('%d', $birthTimestamp);

        $age = $currentYear - $birthYear;

        if ($currentMonth < $birthMonth) {
            $age--;
        } elseif ($currentMonth === $birthMonth) {
            if ($currentDay < $birthDay) {
                $age--;
            }
        }

        return $age;
    }