fnp
/
wolnelektury.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Author page.
[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