week number

This commit is contained in:
j 2025-02-23 11:19:23 -05:00
commit 21311303e1
3 changed files with 5 additions and 7 deletions

View file

@ -34,7 +34,7 @@ def week(year, month, day):
week=ExtractWeek('published')
)
date = datetime.strptime('%s-%s-%s' % (year, month, day), '%Y-%m-%d')
week = int(date.strftime('%W'))
week = int(date.strftime('%U'))
year = int(year)
archive_week = archive.filter(year=year, week=week).order_by('published')
context['weeks'] = get_weeks(archive)