Select a date and compare MySQL WEEK() modes, including different week starts and week-number ranges.
| Mode | First day | Range | Week 1 is the first week… |
|---|---|---|---|
| Server setting | Depends on setting | Uses default_week_format for WEEK() | |
| Sunday | 0–53 | with a Sunday in this year | |
| Monday | 0–53 | with 4 or more days this year | |
| Sunday | 1–53 | with a Sunday in this year | |
| Monday | 1–53 | with 4 or more days this year | |
| Sunday | 0–53 | with 4 or more days this year | |
| Monday | 0–53 | with a Monday in this year | |
| Sunday | 1–53 | with 4 or more days this year | |
| Monday | 1–53 | with a Monday in this year |
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.