Skip to content

Commit 3c66bd6

Browse files
authored
Update update_rates.py
1 parent fe16c5a commit 3c66bd6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/update_rates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def main():
111111
today = datetime.now(timezone.utc)
112112
date_slug = today.strftime('%Y-%m-%d')
113113
date_str_formatted = today.strftime('%d %B %Y')
114-
114+
day, month_name, year = date_str_formatted.split()
115115
for config in POST_CONFIG:
116116
from_code, to_code = config['from_code'], config['to_code']
117117
from_full, to_full = config['from_full'], config['to_full']
@@ -122,7 +122,7 @@ def main():
122122

123123
# Define file paths and names
124124
post_dir = "_posts"
125-
file_slug = f"today-{from_full.lower().replace(' ','-')}-to-{to_code.lower()}-prices-updated-{from_code.lower()}-to-{to_code.lower()}"
125+
file_slug = f"today-{from_full.lower().replace(' ','-')}-to-{to_code.lower()}-{month_name.lower()}-{year}-prices-updated-{from_code.lower()}-to-{to_code.lower()}"
126126
filename = f"{date_slug}-{file_slug}.md"
127127
filepath = os.path.join(post_dir, filename)
128128

0 commit comments

Comments
 (0)