add methods to get icon on article natures
This commit is contained in:
@@ -6,8 +6,6 @@ use Carbon\Carbon;
|
||||
|
||||
class HelperDate
|
||||
{
|
||||
public static $is_debug = true;
|
||||
|
||||
public static function toLocaleFormat($date)
|
||||
{
|
||||
if (! (! is_null($date) && ! empty($date))) {
|
||||
@@ -24,9 +22,8 @@ class HelperDate
|
||||
default:
|
||||
$format = 'Y-m-d';
|
||||
}
|
||||
$date = Carbon::parse($date)->format($format);
|
||||
|
||||
return $date;
|
||||
return Carbon::parse($date)->format($format);
|
||||
}
|
||||
|
||||
public static function fromLocale($d)
|
||||
@@ -61,7 +58,7 @@ class HelperDate
|
||||
|
||||
public static function toFrenchDate($d)
|
||||
{
|
||||
if ($d && $d != '0000-00-00') {
|
||||
if ($d && $d !== '0000-00-00') {
|
||||
return Carbon::createFromFormat('Y-m-d', $d)->format('d/m/Y');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user