Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Commit

Permalink
Allow formatted strings as argument in PHPToExcel date conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkBaker committed Mar 6, 2016
1 parent da91993 commit 802a94f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/PHPExcel/Shared/Date.php
Expand Up @@ -187,7 +187,8 @@ public static function PHPToExcel($dateValue = 0, $adjustToTimezone = false, $ti
$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);

return $retValue;
Expand Down

3 comments on commit 802a94f

@ncwgf
Copy link

@ncwgf ncwgf commented on 802a94f Mar 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change make syntax error
missing a ; at line 191 and
may need to add back }

@Gemorroj
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarkBaker ping

@MarkBaker
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, Apologies

Please sign in to comment.