Update calendar_app.py
Browse files- calendar_app.py +9 -6
calendar_app.py
CHANGED
|
@@ -96,18 +96,21 @@ class Calendar:
|
|
| 96 |
if (self.reminders is None) or len(self.reminders)<1:
|
| 97 |
print(f"No reminders for month: {user_mth}.")
|
| 98 |
else:
|
|
|
|
|
|
|
| 99 |
print("# Date Event Description")
|
| 100 |
print_counter=1
|
| 101 |
for i,(dt,event_description) in enumerate(self.reminders.items()):
|
| 102 |
-
dt = datetime.datetime.strptime(dt, '%Y-%m-%d')
|
| 103 |
-
dt_month = dt.month
|
|
|
|
| 104 |
|
| 105 |
-
print(f"user_mth: {user_mth}")
|
| 106 |
-
print(f"dt: {dt}")
|
| 107 |
-
print(f"dt_month: {dt_month}")
|
| 108 |
|
| 109 |
if user_mth == dt_month:
|
| 110 |
-
print(f"{print_counter}. {dt
|
| 111 |
print_counter+=1
|
| 112 |
|
| 113 |
|
|
|
|
| 96 |
if (self.reminders is None) or len(self.reminders)<1:
|
| 97 |
print(f"No reminders for month: {user_mth}.")
|
| 98 |
else:
|
| 99 |
+
# user_mth = int(user_mth)
|
| 100 |
+
print(f"Event reminders for month: {user_mth}")
|
| 101 |
print("# Date Event Description")
|
| 102 |
print_counter=1
|
| 103 |
for i,(dt,event_description) in enumerate(self.reminders.items()):
|
| 104 |
+
# dt = datetime.datetime.strptime(dt, '%Y-%m-%d')
|
| 105 |
+
# dt_month = dt.month
|
| 106 |
+
dt_month = dt.split("-")[1]
|
| 107 |
|
| 108 |
+
# print(f"user_mth: {user_mth}")
|
| 109 |
+
# print(f"dt: {dt}")
|
| 110 |
+
# print(f"dt_month: {dt_month}")
|
| 111 |
|
| 112 |
if user_mth == dt_month:
|
| 113 |
+
print(f"{print_counter}. {dt} {event_description}")
|
| 114 |
print_counter+=1
|
| 115 |
|
| 116 |
|