'Helper method that figures out if an update should be performed
according to the startup cfg file.
Some rules:
1) IF auto_upd is False THEN return False
2) IF last_upd == \'yesterday\' and freq == \'D\' THEN return True
3) IF last_upd == \'two_days_ago\' and freq == \'W\' THEN return False.
:return: Boolean value.'

def _has_to_update(self):

    startcfg = self._start_cfg
    if (not startcfg.auto_upd):
        return False
    else:
        freq = startcfg.freq
        diff_days = max((date.today() - startcfg.last_upd).days, 0)
        if (((freq == StartUpConfig.FREQ_DAILY) and (diff_days > 0)) or ((freq == StartUpConfig.FREQ_WEEKLY) and (diff_days > 6)) or ((freq == StartUpConfig.FREQ_MONTHLY) and (diff_days > 29))):
            return True
        return False
