def __init__(self, filename=None):
        self.filename = None
        if filename:
            self.load(filename)
def _nearest_weekday(weekday):
    return datetime.now() + timedelta(days=(weekday - datetime.now().weekday()) % 7)