Skip to content

Commit acba082

Browse files
committed
task 5: week numbering sucks
Change-Id: I6ca8662738b3291858c73287724f8e25ddc03bbb
1 parent f9c720e commit acba082

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

majavahbot/tasks/task_5_steward_request_bot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,12 @@ def process_page(
269269

270270
if len(to_archive.keys()) > 0:
271271
now = datetime.now()
272+
now_iso = now.isocalendar()
272273
archive_page_name = archive_format.format(
273274
page=page,
274-
year=now.year,
275+
year=now_iso.year,
275276
month=str(now.month).zfill(2),
276-
week=now.strftime("%U"),
277+
week=now_iso.week,
277278
)
278279

279280
archive_page = api.get_page(archive_page_name)

0 commit comments

Comments
 (0)