/** Define how days left to given date. date according to dateFormat parameter passed on inizialization * @access public * @param date $date The date in traditional format for calculating diff * @return int The amount of days between today and given date */ public function howTo($date) { $today = new MDate(Manager::getSysDate()); return $today->diff($date, '%a'); }