public function getTime() : Time
{
if ($this->month === 0 || $this->year === 0 || $this->day === 0) {
throw new ComposerException('Date not complete.', ComposerException::NOT_COMPLETE);
}
// Checkdate checks if the provided day is valid. Month and year are validated in their getters.
// The year is between 1 and 32767 inclusive.
if (!checkdate($this->month, $this->day, $this->year)) {
throw new ComposerException('Day out of range.', ComposerException::INVALID);
}
$time = mktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year);
return new Time($time);
}