OphTrOperationbooking_Operation_Sequence::checkDates PHP Method

checkDates() public method

public checkDates ( )
    public function checkDates()
    {
        if (!empty($this->end_date)) {
            $start = strtotime($this->start_date);
            $end = strtotime($this->end_date);
            if ($end < $start) {
                $this->addError('end_date', 'End date must be after the start date.');
            }
        }
    }