def autorangeoptions(dates, padding=10000000):
    """
    Default autorange mix and max for all graphs.
    See: https://github.com/babybuddy/babybuddy/issues/706
    :param dates: list of datetime.date objects organized latest to oldest.
    :param padding: additional padding to add to the bounds.
    :return: a dict of our autorange options.
    """
    return dict(
        {
            "minallowed": int(time.mktime(dates[-1].timetuple())) * 1000 - padding,
            "maxallowed": int(time.mktime(dates[0].timetuple())) * 1000 + padding,
        },
    )

    Default autorange mix and max for all graphs.
    See: https://github.com/babybuddy/babybuddy/issues/706
    :param dates: list of datetime.date objects organized latest to oldest.
    :param padding: additional padding to add to the bounds.
    :return: a dict of our autorange options.
    
reports/utils.py