35 $timeValue = str_replace([
'/',
'.'],
'-', $timeValue);
37 $arraySplit = preg_split(
'/[\/:\-\s]/', $timeValue) ?: [];
38 if ((count($arraySplit) == 2 || count($arraySplit) == 3) && $arraySplit[0] > 24) {
39 $arraySplit[0] = ($arraySplit[0] % 24);
40 $timeValue = implode(
':', $arraySplit);
43 $PHPDateArray = date_parse($timeValue);
45 if (($PHPDateArray !==
false) && ($PHPDateArray[
'error_count'] == 0)) {
47 $excelDateValue = SharedDateHelper::formattedPHPToExcel(1900, 1, 1, $PHPDateArray[
'hour'], $PHPDateArray[
'minute'], $PHPDateArray[
'second']) - 1;
51 $retValue = (float) $excelDateValue;
53 $retValue = (int) $phpDateValue = SharedDateHelper::excelToTimestamp($excelDateValue + 25569) - 3600;
55 $retValue =
new DateTime(
'1900-01-01 ' . $PHPDateArray[
'hour'] .
':' . $PHPDateArray[
'minute'] .
':' . $PHPDateArray[
'second']);
static getReturnDateType()
Return the current Return Date Format for functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object).
const RETURNDATE_UNIX_TIMESTAMP
static flattenSingleValue($value='')
Convert an array to a single scalar value by extracting the first element.
static fromString($timeValue)
TIMEVALUE.