add holiday, upd reminder output

This commit is contained in:
Rykov7
2022-08-22 21:21:42 +03:00
parent 4b154a52c4
commit a57cb367f3
3 changed files with 13 additions and 12 deletions
+2 -2
View File
@@ -27,11 +27,11 @@ def remind(chat_to_repeat=PYTHONCHATRU, today=dt.today()):
date = '09-12-1000' # instead of 09-13-1000 in non-leap-year
date = dt.strptime(date, "%m-%d-%Y")
if today.month == date.month and today.day == date.day:
notification = f'🎉💻 Сегодня <b><u>{holiday.upper()}</u></b>!\
notification = f'🎉 Сегодня <b><u>{holiday.upper()}</u></b>!\
\n\n{description}.'
if date.year != 1000:
age = today.year - date.year
notification += f'\n<i>{age} годовщина</i>'
notification += f'\n\n🥳 <i>{age}-ая годовщина</i>'
bot.send_message(chat_to_repeat, notification, parse_mode='HTML')