Allow formatted strings as argument in PHPToExcel date conversion

This commit is contained in:
MarkBaker 2016-03-06 23:27:33 +00:00
parent 467dc6e80e
commit 0c3a5c2e40
1 changed files with 2 additions and 0 deletions

View File

@ -189,6 +189,8 @@ class Date
$retValue = self::FormattedPHPToExcel($dateValue->format('Y'), $dateValue->format('m'), $dateValue->format('d'), $dateValue->format('H'), $dateValue->format('i'), $dateValue->format('s'));
} elseif (is_numeric($dateValue)) {
$retValue = self::FormattedPHPToExcel(date('Y', $dateValue), date('m', $dateValue), date('d', $dateValue), date('H', $dateValue), date('i', $dateValue), date('s', $dateValue));
} elseif (is_string($dateValue)) {
$retValue = self::stringToExcel($dateValue)
}
date_default_timezone_set($saveTimeZone);