You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Date.php 540B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace common\components;
  3. class Date
  4. {
  5. public static function getDaysOfWeekArray(): array
  6. {
  7. return [
  8. 1 => 'Lundi',
  9. 2 => 'Mardi',
  10. 3 => 'Mercredi',
  11. 4 => 'Jeudi',
  12. 5 => 'Vendredi',
  13. 6 => 'Samedi',
  14. 7 => 'Dimanche'
  15. ];
  16. }
  17. public static function getDayOfWeekStringByNumber(int $dayOfWeekNumber): string
  18. {
  19. $daysOfWeekArray = self::getDaysOfWeekArray();
  20. return $daysOfWeekArray[$dayOfWeekNumber];
  21. }
  22. }