Update inkycal_icalendar.py

This commit is contained in:
Ace 2019-12-05 23:06:45 +01:00 committed by GitHub
parent 36d553660c
commit 6b7366924a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,8 @@ from ics import Calendar
print_events = False
style = 'DD MMM YY HH:mm'
def fetch_events():
"""Set timelines for filtering upcoming events"""
now = arrow.now(tz=get_tz())
beginning_of_month = now.replace(days= - now.day +1)
@ -48,3 +50,5 @@ if print_events == True and upcoming_events:
print('{0} {1} | {2} | {3} | All day ='.format(events.name,
' '* (line_width - len(events.name)), events.begin.format(style),
events.end.format(style)), events.all_day)
return upcoming_events