Select a date and compare MySQL YEARWEEK() modes. The returned year can differ from the date year near year boundaries.
| Mode | First day | Range | Week 1 is the first week… |
|---|---|---|---|
| Sunday | 0–53 | with a Sunday in this year | |
| 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.