Browse Source

Refactoring services

develop
Guillaume 3 years ago
parent
commit
ce1b73251e
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      Component/DateComponent.php

+ 1
- 2
Component/DateComponent.php View File



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 = [

Loading…
Cancel
Save