Schedules, fundings, polls, libraries
[wolnelektury.git] / src / club / utils.py
1 from datetime import timedelta
2
3
4 def add_year(date):
5     return date.replace(year=date.year + 1)
6
7 def add_month(date):
8     day = date.day
9     date = (date.replace(day=1) + timedelta(31)).replace(day=1) + timedelta(day - 1)
10     if date.day != day:
11         date = date.replace(day=1)
12     return date
13