Bonjour,
J'ai un soucis avec sprintf() pour formater une date. Je reçois ma date avec 3 arguments : $this->getDay(), $this->getMonth() et $this->getYear().
$this->getDay() prend le format 'dd'
$this->getMonth()prend le format 'mm'
$this->getYear()prend le format 'yyyy'
je fais un
Et, en retour, j'ai ma date aa-mm-yyyy au lieu de aa-mm-yy.
Code : Sélectionner tout - Visualiser dans une fenêtre à part sprintf('%02d-%02d-%02d', $this->getDay(), $this->getMonth(), $this->getYear());
Quelqu'un aurait-il une idée de pourquoi ?
Par avance, merci.
jlNikko
Partager