Commit a0dfb54b authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Fix format de la date y => Y

parent 1db2e883
Loading
Loading
Loading
Loading
+3 −1
Changes for module/Formation/src/Formation/Entity/Db/Session.php: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -250,10 +250,12 @@ class Session implements HistoriqueAwareInterface,

    public function getLimiteInscription() : ?DateTime
    {
        $id = $this->getId();

        $debut = $this->getDateDebut();
        if ($debut === null) return null;

        $limite = DateTime::createFromFormat('d/m/Y', $debut->format('d/m/y'));
        $limite = DateTime::createFromFormat('d/m/Y', $debut->format('d/m/Y'));
        $limite->sub(new DateInterval('P14D'));
        return $limite;
    }