diff --git a/src/update_commit.py b/src/update_commit.py index 785d156a..ea64a09e 100644 --- a/src/update_commit.py +++ b/src/update_commit.py @@ -16,10 +16,10 @@ # Get the current date today = datetime.today() day_of_month = today.strftime("%d") # Get current day of the month - month = today.strftime("%b") # Get current month (e.g., Nov) + month = today.strftime("%B") # Get current full month name (e.g., November) - # Format the solution file name for today (e.g., 07(Nov)Next Problem.md) - today_solution_filename = f"{day_of_month}({month}){today.strftime('%A')}.md" + # Format the solution file name for today (e.g., 06(Nov)Root to leaf paths sum.md) + today_solution_filename = f"{day_of_month}({today.strftime('%b')}){today.strftime('%A')}.md" # Prepare the badge URL and commit link to update README badge_url = "https://img.shields.io/badge/GeeksforGeeks-Solution%20of%20the%20Day-blue" @@ -29,7 +29,7 @@ with open(readme_path, "r") as readme: content = readme.read() - # Update today's solution link + # Update today's solution link in the README content = re.sub( r"(?<=).*?(?=)", f"\nhttps://github.com/{repository}/blob/main/{month}%202024%20GFG%20SOLUTION/{today_solution_filename}\n", @@ -37,7 +37,7 @@ flags=re.DOTALL ) - # Update badge link + # Update the badge link content = re.sub( r"(?<=).*?(?=)", f"\n{badge_link}\n",