public function getDiffMessage($count, $invert, $unit)
    {
        if (0 === $count) {
            throw new \InvalidArgumentException('The count must not be null.');
        }

        $unit = strtolower($unit);

        if (!in_array($unit, array('year', 'month', 'day', 'hour', 'minute', 'second'))) {
            throw new \InvalidArgumentException(sprintf('The unit \'%s\' is not supported.', $unit));
        }

        return $this->doGetDiffMessage($count, $invert, $unit);
    }
public function getDiffMessage($count, $invert, $unit)
    {
        if (0 === $count) {
            throw new \InvalidArgumentException('The count must not be null.');
        }

        $unit = strtolower($unit);

        if (!in_array($unit, array('year', 'month', 'day', 'hour', 'minute', 'second'))) {
            throw new \InvalidArgumentException(sprintf('The unit \'%s\' is not supported.', $unit));
        }

        return $this->doGetDiffMessage($count, $invert, $unit);
    }
public function getDiffMessage ( $ count , $ invert , $ unit ) { if ( 0 === $ count ) { throw new \ InvalidArgumentException ( 'The count must not be null.' ) ; } $ unit = strtolower ( $ unit ) ; if ( ! in_array ( $ unit , array ( 'year' , 'month' , 'day' , 'hour' , 'minute' , 'second' ) ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The unit \'%s\' is not supported.' , $ unit ) ) ; } return $ this -> doGetDiffMessage ( $ count , $ invert , $ unit ) ; }
Returns the diff message for the specified count and unit

@param  integer $count  The diff count
@param  boolean $invert Whether to invert the count
@param  integer $unit   The unit must be either year, month, day, hour,
minute or second

@return string
Returns the diff message for the specified count and unit