public function add($param) { $value = Sanitize::integer($param); $param = Sanitize::letters($param); $hour = $this->getHours(); $minute = $this->getMinutes(); $second = $this->getSeconds(); $month = $this->getMonth(); $day = $this->getDay(); $year = $this->getYear(); switch ($param) { case 'y': $year += $value; break; case 'm': $month += $value; break; case 'd': $day += $value; break; case 'h': $hour += $value; break; case 'i': $minute += $value; break; case 's': $second += $value; break; default: break; } $this->changeDate(date('Y-m-d H:i:s', mktime($hour, $minute, $second, $month, $day, $year))); }