add methods to get icon on article natures

This commit is contained in:
Ludovic CANDELLIER
2023-09-12 23:00:36 +02:00
parent 470560efb6
commit a29faabbf2
22 changed files with 583 additions and 155 deletions

View File

@@ -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');
}