@@ 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 | /** |
|
@@ 1086-1093 (lines=8) @@ | ||
1083 | } |
|
1084 | } |
|
1085 | ||
1086 | switch (Functions::getReturnDateType()) { |
|
1087 | case Functions::RETURNDATE_EXCEL: |
|
1088 | return (float) $endDate; |
|
1089 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
1090 | return (integer) \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp($endDate); |
|
1091 | case Functions::RETURNDATE_PHP_OBJECT: |
|
1092 | return \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($endDate); |
|
1093 | } |
|
1094 | } |
|
1095 | ||
1096 | /** |
|
@@ 1476-1483 (lines=8) @@ | ||
1473 | // Execute function |
|
1474 | $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths); |
|
1475 | ||
1476 | switch (Functions::getReturnDateType()) { |
|
1477 | case Functions::RETURNDATE_EXCEL: |
|
1478 | return (float) \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject); |
|
1479 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
1480 | return (integer) \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp(\PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject)); |
|
1481 | case Functions::RETURNDATE_PHP_OBJECT: |
|
1482 | return $PHPDateObject; |
|
1483 | } |
|
1484 | } |
|
1485 | ||
1486 | /** |
|
@@ 1524-1531 (lines=8) @@ | ||
1521 | $adjustDaysString = '-' . $adjustDays . ' days'; |
|
1522 | $PHPDateObject->modify($adjustDaysString); |
|
1523 | ||
1524 | switch (Functions::getReturnDateType()) { |
|
1525 | case Functions::RETURNDATE_EXCEL: |
|
1526 | return (float) \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject); |
|
1527 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
1528 | return (integer) \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp(\PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject)); |
|
1529 | case Functions::RETURNDATE_PHP_OBJECT: |
|
1530 | return $PHPDateObject; |
|
1531 | } |
|
1532 | } |
|
1533 | } |
|
1534 |