@@ 330-337 (lines=8) @@ | ||
327 | ||
328 | // Execute function |
|
329 | $excelDateValue = \PhpOffice\PhpSpreadsheet\Shared\Date::formattedPHPToExcel($year, $month, $day); |
|
330 | switch (Functions::getReturnDateType()) { |
|
331 | case Functions::RETURNDATE_EXCEL: |
|
332 | return (float) $excelDateValue; |
|
333 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
334 | return (integer) \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp($excelDateValue); |
|
335 | case Functions::RETURNDATE_PHP_OBJECT: |
|
336 | return \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($excelDateValue); |
|
337 | } |
|
338 | } |
|
339 | ||
340 | /** |
|
@@ 1097-1104 (lines=8) @@ | ||
1094 | } |
|
1095 | } |
|
1096 | ||
1097 | switch (Functions::getReturnDateType()) { |
|
1098 | case Functions::RETURNDATE_EXCEL: |
|
1099 | return (float) $endDate; |
|
1100 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
1101 | return (integer) \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp($endDate); |
|
1102 | case Functions::RETURNDATE_PHP_OBJECT: |
|
1103 | return \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($endDate); |
|
1104 | } |
|
1105 | } |
|
1106 | ||
1107 | /** |
|
@@ 1487-1494 (lines=8) @@ | ||
1484 | // Execute function |
|
1485 | $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths); |
|
1486 | ||
1487 | switch (Functions::getReturnDateType()) { |
|
1488 | case Functions::RETURNDATE_EXCEL: |
|
1489 | return (float) \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject); |
|
1490 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
1491 | return (integer) \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp(\PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject)); |
|
1492 | case Functions::RETURNDATE_PHP_OBJECT: |
|
1493 | return $PHPDateObject; |
|
1494 | } |
|
1495 | } |
|
1496 | ||
1497 | /** |
|
@@ 1535-1542 (lines=8) @@ | ||
1532 | $adjustDaysString = '-' . $adjustDays . ' days'; |
|
1533 | $PHPDateObject->modify($adjustDaysString); |
|
1534 | ||
1535 | switch (Functions::getReturnDateType()) { |
|
1536 | case Functions::RETURNDATE_EXCEL: |
|
1537 | return (float) \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject); |
|
1538 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
1539 | return (integer) \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp(\PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject)); |
|
1540 | case Functions::RETURNDATE_PHP_OBJECT: |
|
1541 | return $PHPDateObject; |
|
1542 | } |
|
1543 | } |
|
1544 | } |
|
1545 |