@@ 337-344 (lines=8) @@ | ||
334 | ||
335 | // Execute function |
|
336 | $excelDateValue = \PhpSpreadsheet\Shared\Date::formattedPHPToExcel($year, $month, $day); |
|
337 | switch (Functions::getReturnDateType()) { |
|
338 | case Functions::RETURNDATE_EXCEL: |
|
339 | return (float) $excelDateValue; |
|
340 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
341 | return (integer) \PhpSpreadsheet\Shared\Date::excelToTimestamp($excelDateValue); |
|
342 | case Functions::RETURNDATE_PHP_OBJECT: |
|
343 | return \PhpSpreadsheet\Shared\Date::excelToDateTimeObject($excelDateValue); |
|
344 | } |
|
345 | } |
|
346 | ||
347 | ||
@@ 1108-1115 (lines=8) @@ | ||
1105 | } |
|
1106 | } |
|
1107 | ||
1108 | switch (Functions::getReturnDateType()) { |
|
1109 | case Functions::RETURNDATE_EXCEL: |
|
1110 | return (float) $endDate; |
|
1111 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
1112 | return (integer) \PhpSpreadsheet\Shared\Date::excelToTimestamp($endDate); |
|
1113 | case Functions::RETURNDATE_PHP_OBJECT: |
|
1114 | return \PhpSpreadsheet\Shared\Date::excelToDateTimeObject($endDate); |
|
1115 | } |
|
1116 | } |
|
1117 | ||
1118 | ||
@@ 1503-1510 (lines=8) @@ | ||
1500 | // Execute function |
|
1501 | $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths); |
|
1502 | ||
1503 | switch (Functions::getReturnDateType()) { |
|
1504 | case Functions::RETURNDATE_EXCEL: |
|
1505 | return (float) \PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject); |
|
1506 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
1507 | return (integer) \PhpSpreadsheet\Shared\Date::excelToTimestamp(\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject)); |
|
1508 | case Functions::RETURNDATE_PHP_OBJECT: |
|
1509 | return $PHPDateObject; |
|
1510 | } |
|
1511 | } |
|
1512 | ||
1513 | ||
@@ 1552-1559 (lines=8) @@ | ||
1549 | $adjustDaysString = '-' . $adjustDays . ' days'; |
|
1550 | $PHPDateObject->modify($adjustDaysString); |
|
1551 | ||
1552 | switch (Functions::getReturnDateType()) { |
|
1553 | case Functions::RETURNDATE_EXCEL: |
|
1554 | return (float) \PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject); |
|
1555 | case Functions::RETURNDATE_PHP_NUMERIC: |
|
1556 | return (integer) \PhpSpreadsheet\Shared\Date::excelToTimestamp(\PhpSpreadsheet\Shared\Date::PHPToExcel($PHPDateObject)); |
|
1557 | case Functions::RETURNDATE_PHP_OBJECT: |
|
1558 | return $PHPDateObject; |
|
1559 | } |
|
1560 | } |
|
1561 | } |
|
1562 |