• [^] # Re: .

    Posté par . En réponse au message On on pouvais m'expliquer cela, ça serait vraiment sympa .... :). Évalué à 1.

    oui effectivement voici la classe et le constructeur mais je trouve cela tres bordelique pas toi ?

    class _date
    {
    var $j;
    var $m;
    var $a;
    var $h;
    var $mn;

    /** CONSTRUCTEUR **/
    function _date($date=0,$j=0,$m=0,$a=0,$h=0,$mn=0)
    {
    if($date==0)
    {
    $this->j=toInt($j);
    $this->m=toInt($m);
    $this->a=toInt($a);
    $this->h=toInt($h);
    $this->mn=toInt($mn);
    }
    else
    {
    $this->a=toInt(substr($date,0,4));
    $this->m=toInt(substr($date,5,2));
    $this->j=toInt(substr($date,8,2));
    $this->h=toInt(substr($date,11,2));
    $this->mn=toInt(substr($date,13,2));
    }
    }