protected function guardDate(int $year, int $month, int $day): void
    {
        if (!checkdate($month, $day, $year)) {
            $message = sprintf('Invalid date: %04d-%02d-%02d', $year, $month, $day);
            throw new DomainException($message);
        }
    }