now = get_now()
saints = {}
saints["today"] = _parse_saint(sourcesaints[now.month - 1][now.day - 1])
- saints["tomorrow"] = _parse_saint(sourcesaints[now.month - 1][now.day])
+ nbdays = len(sourcesaints[now.month - 1])
+ if now.day == nbdays: # il faut regarder le mois suivant
+ if now.month == 12: # il faut regarder l'année suivante
+ saints["tomorrow"] = _parse_saint(sourcesaints[0][0])
+ else:
+ saints["tomorrow"] = _parse_saint(sourcesaints[now.month][0])
+ else:
+ saints["tomorrow"] = _parse_saint(sourcesaints[now.month - 1][now.day])
firstnames = _get_firstnames()
towish = {"today" : [], "tomorrow" : []}
for day in ["today", "tomorrow"]: