Skip to content

[rejected AI] fix: parse HTML week values as ISO weeks - #938

Closed
SashaMIT wants to merge 1 commit into
pallets-eco:mainfrom
SashaMIT:iso-week
Closed

SashaMIT wants to merge 1 commit into
pallets-eco:mainfrom
SashaMIT:iso-week

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Oct 1, 2026 •

Copy link
Copy Markdown

Purpose

<input type="week"> submits an ISO week, YYYY-Www. WeekField parsed it with %Y-W%W, which counts from the first Monday of the calendar year.

2015-W01 became January 5, 2015. The Monday of that ISO week is December 29, 2014. 2020-W01 and 2026-W53 were off the same way. 2023-W03 still lands on January 16, 2023, because the two calendars agree that year.

The default format is now %G-W%V. A custom %W format is unchanged.

Test plan

  • pytest tests/fields/test_week.py (4 passed)
  • pytest tests/fields (217 passed)

Drafted with Grok 4.7. The code has not yet been reviewed by a human.

<input type="week"> submits YYYY-Www. %W counted from the first Monday of the calendar year, so 2015-W01 became January 5, 2015.
@davidism

davidism commented Oct 1, 2026

Copy link
Copy Markdown
Member

@davidism davidism closed this Oct 1, 2026
@davidism davidism changed the title fix: parse HTML week values as ISO weeks [rejected AI] fix: parse HTML week values as ISO weeks Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants