Skip to content

Commit

Permalink
FIX: fixed some more bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
jklymak committed Dec 3, 2021
1 parent 351671f commit a61575c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gcalcli/gcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,16 +1161,14 @@ def _display_free(self, start, end, search=None,
dayst = dayst + timedelta(days=1)
dayend = dayend + timedelta(days=1)
nextst = dayst
print_prefix = True
prefix = dayst.strftime('\n%a %b %d')
if event['s'] > nextst:

if (event['s'] > nextst):
self.printer.msg(prefix, 'green')
self.printer.msg(f" {nextst.strftime('%H:%M')} to ")
self.printer.msg(f"{event['s'].strftime('%H:%M')}\n")
nextst = event['e']
prefix = ' '
if (event['s'] <= nextst) and (event['e'] < dayend):
if (event['s'] <= nextst) and (event['s'] >= dayst):
nextst = event['e']

# last event:
Expand Down

0 comments on commit a61575c

Please sign in to comment.