|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DateComponent |
|
|
class DateComponent |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
public function date($format, $timestamp) |
|
|
public function date($format, $timestamp) |
|
|
{ |
|
|
{ |
|
|
setlocale(LC_TIME, 'fr_FR.UTF8', 'fr.UTF8', 'fr_FR.UTF-8', 'fr.UTF-8'); |
|
|
setlocale(LC_TIME, 'fr_FR.UTF8', 'fr.UTF8', 'fr_FR.UTF-8', 'fr.UTF-8'); |
|
|
|
|
|
|
|
|
return $this->getNextDay($this->getDayByNumber($number, 'en')); |
|
|
return $this->getNextDay($this->getDayByNumber($number, 'en')); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static function getDayByNumber($number, $lang = 'fr') |
|
|
|
|
|
|
|
|
public function getDayByNumber($number, $lang = 'fr') |
|
|
{ |
|
|
{ |
|
|
if ($lang == 'fr') { |
|
|
if ($lang == 'fr') { |
|
|
$daysArray = [ |
|
|
$daysArray = [ |