@staticmethod
def get_unit_generic(freq):
    if (freq == YEARLY):
        return DAYS_PER_YEAR
    elif (freq == MONTHLY):
        return DAYS_PER_MONTH
    elif (freq == WEEKLY):
        return DAYS_PER_WEEK
    elif (freq == DAILY):
        return 1.0
    elif (freq == HOURLY):
        return (1.0 / HOURS_PER_DAY)
    elif (freq == MINUTELY):
        return (1.0 / MINUTES_PER_DAY)
    elif (freq == SECONDLY):
        return (1.0 / SEC_PER_DAY)
    else:
        return (- 1)
@staticmethod
def get_unit_generic(freq):
    if (freq == YEARLY):
        return DAYS_PER_YEAR
    elif (freq == MONTHLY):
        return DAYS_PER_MONTH
    elif (freq == WEEKLY):
        return DAYS_PER_WEEK
    elif (freq == DAILY):
        return 1.0
    elif (freq == HOURLY):
        return (1.0 / HOURS_PER_DAY)
    elif (freq == MINUTELY):
        return (1.0 / MINUTES_PER_DAY)
    elif (freq == SECONDLY):
        return (1.0 / SEC_PER_DAY)
    else:
        return (- 1)