The formatDate() helper method now returns an empty strin, if the input date is
null. As yet it returned the current date.
This commit is contained in:
@@ -72,6 +72,10 @@ function swapComma(string $floatString) {
|
||||
*/
|
||||
function formatDate($date, $format='d.m.Y')
|
||||
{
|
||||
if (is_null($date)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return Carbon\Carbon::parse($date)->format($format);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user