|
12345678910111213141516171819202122232425 |
- <?php
-
- namespace common\components;
-
- class Date
- {
- public static function getDaysOfWeekArray(): array
- {
- return [
- 1 => 'Lundi',
- 2 => 'Mardi',
- 3 => 'Mercredi',
- 4 => 'Jeudi',
- 5 => 'Vendredi',
- 6 => 'Samedi',
- 7 => 'Dimanche'
- ];
- }
-
- public static function getDayOfWeekStringByNumber(int $dayOfWeekNumber): string
- {
- $daysOfWeekArray = self::getDaysOfWeekArray();
- return $daysOfWeekArray[$dayOfWeekNumber];
- }
- }
|