@@ 338-345 (lines=8) @@ | ||
335 | ||
336 | // Execute function |
|
337 | $excelDateValue = \PhpOffice\PhpSpreadsheet\Shared\Date::formattedPHPToExcel($year, $month, $day); |
|
338 | switch (Functions::getReturnDateType()) { |
|
339 | case Functions::RETURNDATE_EXCEL: |
|
340 | return (float) $excelDateValue; |
|
341 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
342 | return (int) \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp($excelDateValue); |
|
343 | case Functions::RETURNDATE_PHP_OBJECT: |
|
344 | return \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($excelDateValue); |
|
345 | } |
|
346 | } |
|
347 | ||
348 | /** |
|
@@ 1115-1122 (lines=8) @@ | ||
1112 | } |
|
1113 | } |
|
1114 | ||
1115 | switch (Functions::getReturnDateType()) { |
|
1116 | case Functions::RETURNDATE_EXCEL: |
|
1117 | return (float) $endDate; |
|
1118 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
1119 | return (int) \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp($endDate); |
|
1120 | case Functions::RETURNDATE_PHP_OBJECT: |
|
1121 | return \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($endDate); |
|
1122 | } |
|
1123 | } |
|
1124 | ||
1125 | /** |
|
@@ 1514-1521 (lines=8) @@ | ||
1511 | // Execute function |
|
1512 | $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths); |
|
1513 | ||
1514 | switch (Functions::getReturnDateType()) { |
|
1515 | case Functions::RETURNDATE_EXCEL: |
|
1516 | return (float) \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject); |
|
1517 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
1518 | return (int) \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp(\PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject)); |
|
1519 | case Functions::RETURNDATE_PHP_OBJECT: |
|
1520 | return $PHPDateObject; |
|
1521 | } |
|
1522 | } |
|
1523 | ||
1524 | /** |
|
@@ 1563-1570 (lines=8) @@ | ||
1560 | $adjustDaysString = '-' . $adjustDays . ' days'; |
|
1561 | $PHPDateObject->modify($adjustDaysString); |
|
1562 | ||
1563 | switch (Functions::getReturnDateType()) { |
|
1564 | case Functions::RETURNDATE_EXCEL: |
|
1565 | return (float) \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject); |
|
1566 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
1567 | return (int) \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp(\PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject)); |
|
1568 | case Functions::RETURNDATE_PHP_OBJECT: |
|
1569 | return $PHPDateObject; |
|
1570 | } |
|
1571 | } |
|
1572 | } |
|
1573 |