public function now($format = null)
    {
        $date = $this->currentDate
            ? clone $this->currentDate
            : ($this->currentDate = new \DateTime())
        ;

        return empty($format) ?
            $date :
            $date->format($format)
        ;
    }
public function now($format = null)
    {
        $date = $this->currentDate
            ? clone $this->currentDate
            : ($this->currentDate = new \DateTime())
        ;

        return empty($format) ?
            $date :
            $date->format($format)
        ;
    }
public function now ( $ format = null ) { $ date = $ this -> currentDate ? clone $ this -> currentDate : ( $ this -> currentDate = new \ DateTime ( ) ) ; return empty ( $ format ) ? $ date : $ date -> format ( $ format ) ; }
return current date

@param string $format optionnal date format

@return \DateTime
return current date