Skip to content

Commit 802a94f

Browse files
author
MarkBaker
committed
Allow formatted strings as argument in PHPToExcel date conversion
1 parent da91993 commit 802a94f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Classes/PHPExcel/Shared/Date.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ public static function PHPToExcel($dateValue = 0, $adjustToTimezone = false, $ti
187187
$retValue = self::FormattedPHPToExcel($dateValue->format('Y'), $dateValue->format('m'), $dateValue->format('d'), $dateValue->format('H'), $dateValue->format('i'), $dateValue->format('s'));
188188
} elseif (is_numeric($dateValue)) {
189189
$retValue = self::FormattedPHPToExcel(date('Y', $dateValue), date('m', $dateValue), date('d', $dateValue), date('H', $dateValue), date('i', $dateValue), date('s', $dateValue));
190-
}
190+
} elseif (is_string($dateValue)) {
191+
$retValue = self::stringToExcel($dateValue)
191192
date_default_timezone_set($saveTimeZone);
192193

193194
return $retValue;

0 commit comments

Comments
 (0)