|
|
@@ -65,17 +65,30 @@ class Utils |
|
|
|
$this->em = $em ; |
|
|
|
} |
|
|
|
|
|
|
|
public static function getDayByNumber($number) |
|
|
|
public static function getDayByNumber($number, $lang = 'fr') |
|
|
|
{ |
|
|
|
$daysArray = [ |
|
|
|
1 => 'Lundi', |
|
|
|
2 => 'Mardi', |
|
|
|
3 => 'Mercredi', |
|
|
|
4 => 'Jeudi', |
|
|
|
5 => 'Vendredi', |
|
|
|
6 => 'Samedi', |
|
|
|
7 => 'Dimanche' |
|
|
|
] ; |
|
|
|
if($lang == 'fr') { |
|
|
|
$daysArray = [ |
|
|
|
1 => 'Lundi', |
|
|
|
2 => 'Mardi', |
|
|
|
3 => 'Mercredi', |
|
|
|
4 => 'Jeudi', |
|
|
|
5 => 'Vendredi', |
|
|
|
6 => 'Samedi', |
|
|
|
7 => 'Dimanche' |
|
|
|
] ; |
|
|
|
} |
|
|
|
else { |
|
|
|
$daysArray = [ |
|
|
|
1 => 'Monday', |
|
|
|
2 => 'Tuesday', |
|
|
|
3 => 'Wednesday', |
|
|
|
4 => 'Thursday', |
|
|
|
5 => 'Friday', |
|
|
|
6 => 'Saturday', |
|
|
|
7 => 'Sunday', |
|
|
|
] ; |
|
|
|
} |
|
|
|
|
|
|
|
if(isset($daysArray[$number])) { |
|
|
|
return $daysArray[$number] ; |