add holiday, upd reminder output
This commit is contained in:
+2
-2
@@ -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')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user