@@ 571-578 (lines=8) @@ | ||
568 | $PHPDateArray['second'] |
|
569 | ) |
|
570 | ); |
|
571 | switch (Functions::getReturnDateType()) { |
|
572 | case Functions::RETURNDATE_EXCEL: |
|
573 | return (float) $excelDateValue; |
|
574 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
575 | return (integer) \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp($excelDateValue); |
|
576 | case Functions::RETURNDATE_PHP_OBJECT: |
|
577 | return new \DateTime($PHPDateArray['year'] . '-' . $PHPDateArray['month'] . '-' . $PHPDateArray['day'] . ' 00:00:00'); |
|
578 | } |
|
579 | } |
|
580 | ||
581 | return Functions::VALUE(); |
|
@@ 631-638 (lines=8) @@ | ||
628 | $excelDateValue = \PhpOffice\PhpSpreadsheet\Shared\Date::formattedPHPToExcel(1900, 1, 1, $PHPDateArray['hour'], $PHPDateArray['minute'], $PHPDateArray['second']) - 1; |
|
629 | } |
|
630 | ||
631 | switch (Functions::getReturnDateType()) { |
|
632 | case Functions::RETURNDATE_EXCEL: |
|
633 | return (float) $excelDateValue; |
|
634 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
635 | return (integer) $phpDateValue = \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp($excelDateValue + 25569) - 3600; |
|
636 | case Functions::RETURNDATE_PHP_OBJECT: |
|
637 | return new \DateTime('1900-01-01 ' . $PHPDateArray['hour'] . ':' . $PHPDateArray['minute'] . ':' . $PHPDateArray['second']); |
|
638 | } |
|
639 | } |
|
640 | ||
641 | return Functions::VALUE(); |