Merge remote-tracking branch 'origin/staging' into origin/production
This commit is contained in:
@@ -11,6 +11,7 @@ use Illuminate\Support\Facades\DB;
|
||||
use App\Models\Member;
|
||||
use App\Models\User;
|
||||
use App\Models\Service;
|
||||
use DateTime;
|
||||
|
||||
class Helper
|
||||
{
|
||||
@@ -426,4 +427,20 @@ class Helper
|
||||
ini_set('memory_limit', '256M');
|
||||
}
|
||||
|
||||
public static function dateParser($date_from_row) {
|
||||
if ($date_from_row instanceof DateTime) {
|
||||
return $date_from_row->format('Y-m-d');
|
||||
} else if ($date_from_row != null) {
|
||||
if (strtotime($date_from_row)){
|
||||
return date('Y-m-d', strtotime($date_from_row));
|
||||
} else {
|
||||
// throw new ImportRowException(__('Format Date Invalid'), 0, null, $date_from_row);
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
// throw new ImportRowException(__('Format Date Invalid'), 0, null, $date_from_row);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user