Skip to content

Commit eab942e

Browse files
committed
quick fix bug
1 parent a24f83b commit eab942e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bot/telegram_bot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ def log_transaction(user_data, update):
462462
# datatime data
463463
current_datetime = dt.datetime.now(timezone)
464464
day = current_datetime.day
465-
month = current_datetime.strftime("%B")
465+
month = current_datetime.strftime("%b")
466466

467467
# tracker data
468468
day_tracker = int(trackers[0])
@@ -483,7 +483,7 @@ def log_transaction(user_data, update):
483483
if day_tracker < day or day == 1:
484484
msg = f"New entry for {day} {month}"
485485
if day == 1:
486-
month = (current_datetime - dt.timedelta(days=1)).strftime("%B")
486+
month = (current_datetime - dt.timedelta(days=1)).strftime("%b")
487487
# update prev day
488488
msg = f"{msg}\nCreating sum for day {day_tracker}"
489489
gs.update_prev_day(sheet_id, month, first_row)
@@ -706,7 +706,7 @@ def cpf(update, context) -> int:
706706
try:
707707
row_data = [income, place, cpf, remarks]
708708
current_datetime = dt.datetime.now(timezone)
709-
month = current_datetime.strftime("%B")
709+
month = current_datetime.strftime("%b")
710710
if gs.update_income(sheet_id, month, row_data):
711711
update.callback_query.message.reply_text("Income has been added!")
712712
else:

0 commit comments

Comments
 (0)