PHPExcel有没有办法以dd-mm-yyyy格式验证输入日期?

I have following code for reading data from .xls file.

$inputFileType = PHPExcel_IOFactory::identify($inputFileName);
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objReader->setReadDataOnly(false);

$objPHPExcel = $objReader->load($inputFileName);
$objWorksheet = $objPHPExcel->setActiveSheetIndex(0);
$highestRow = $objWorksheet->getHighestRow();
$highestColumn = $objWorksheet->getHighestColumn();
$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);

$chunksize=_CHUNKSIZE_;
$endRow=$chunksize;
$count=ceil($highestRow/$chunksize);

for ($row=1;$row<=$endRow;$row++)
        {
            if($row>$highestRow){
                break;
            }
            for ($col=0;$col<$highestColumnIndex;$col++)
            {
                $cellobj=$objWorksheet->getCellByColumnAndRow($col, $row);
                $value=$cellobj->getValue();
                if(PHPExcel_Shared_Date::isDateTime($cellobj)) { //to check the date
                    $value=$cellobj->getFormattedValue();
                    
                }
            }
        }

Here it returns the date in 'mm-dd-yyyy' format when in any date is provided in any format. I actually need to validate that the date should be in the 'dd-mm-yyyy'.

</div>

Rather than use

if(PHPExcel_Shared_Date::isDateTime($cellobj)) { //to check the date
    $value=$cellobj->getFormattedValue();
}

to verify if a cell contains a date, and convert it to a string formatted using the cells format mask, use

if(PHPExcel_Shared_Date::isDateTime($cellobj)) { //to check the date
    $datetimeobj = PHPExcel_Shared_Date::ExcelToPHPObject($cellobj->getValue());
}

and you can then use the DateTime object's format() method to format it however you want