public function getExpiresInterval()
    {
        if (!$this->expiresAt) return '';
        $now = new \DateTime();
        $interval = $now->diff($this->expiresAt);
        if ($interval->days == 1)
            return $interval->format('%a jour');
        elseif ($interval->days > 1)
            return $interval->format('%a jours');
        elseif ($interval->h == 1)
            return $interval->format('%h heure');
        else
            return $interval->format('%h heures');
    }
public function getExpiresInterval()
    {
        if (!$this->expiresAt) return '';
        $now = new \DateTime();
        $interval = $now->diff($this->expiresAt);
        if ($interval->days == 1)
            return $interval->format('%a jour');
        elseif ($interval->days > 1)
            return $interval->format('%a jours');
        elseif ($interval->h == 1)
            return $interval->format('%h heure');
        else
            return $interval->format('%h heures');
    }
public function getExpiresInterval ( ) { if ( ! $ this -> expiresAt ) return '' ; $ now = new \ DateTime ( ) ; $ interval = $ now -> diff ( $ this -> expiresAt ) ; if ( $ interval -> days == 1 ) return $ interval -> format ( '%a jour' ) ; elseif ( $ interval -> days > 1 ) return $ interval -> format ( '%a jours' ) ; elseif ( $ interval -> h == 1 ) return $ interval -> format ( '%h heure' ) ; else return $ interval -> format ( '%h heures' ) ; }
Retourne l'intervalle avant l'expiration

@return string
Retourne l intervalle avant l expiration