-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmake.py
More file actions
41 lines (32 loc) · 1.24 KB
/
make.py
File metadata and controls
41 lines (32 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import datetime
#print("___Events (dot) txt___\n__@username__\n")
now = datetime.datetime.now()
##############################
# settings
genDaysAhead = 2000 #4380
WeekdaysStrings = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
# if you want the week to start on sunday, change elif statement below to weekdaynumber == 6
# end settings
for day in range(genDaysAhead):
diff = datetime.timedelta(days=day)
future = now + diff
year = future.strftime("%Y")
month = future.strftime("%m")
day = future.strftime("%d")
printDate = future.strftime("%d/%m/%Y")
monthname = months[int(month) - 1]
weekdaynumber = future.weekday()
weekdayname = WeekdaysStrings[weekdaynumber]
if day == '01':
toPrint = '\n\n' + monthname + '\n' + printDate + ' ' + weekdayname + ' |'
print(toPrint)
elif weekdaynumber == 0:
toPrint = '______\n' + printDate + ' ' + weekdayname + ' |'
print(toPrint)
else:
toPrint = printDate + ' ' + weekdayname + ' |'
print(toPrint)
###############################
print("\n\n#repeatingYearly")
print("\n\n#oob")