boluor opened a new pull request, #3817:
URL: https://github.com/apache/doris-website/pull/3817

   ## Summary
   
   Three changes across two date-time function pages.
   
   **EN \`week.md\` (+1 example)**
   
   \`mode 7\` — weeks start on Monday and week 1 is the week containing the 
first Monday. Because the first Monday of 2023 is January 2, 
\`WEEK('2023-01-01', 7)\` returns 52 (last week of 2022). ZH already had this 
example.
   
   **EN \`weekofyear.md\` (+3 examples)**
   
   | SQL | Returns | Why interesting |
   |-----|---------|-----------------|
   | \`WEEKOFYEAR('2022-01-02')\` | 52 | The week 2021-12-27 to 2022-01-02 has 
only 2 days in 2022, so it falls in week 52 of 2021 |
   | \`WEEKOFYEAR('2023-12-25')\` | 52 | The final week of 2023 |
   | \`weekofyear('1023-01-04')\` | 1 | Pre-modern year — the function does not 
enforce a minimum year |
   
   ZH already had analogues of these.
   
   **ZH \`weekofyear.md\` typo fix**
   
   The cross-year example's prose described the 2021-12-27..2022-01-02 week, 
but the SQL was \`WEEKOFYEAR('2023-01-02')\` and returned 1 — wrong week for 
the prose, and a duplicate of the example just above. Change the SQL and alias 
to \`'2022-01-02'\` / \`week_20220102\` so the example actually demonstrates 
what the comment says (returns 52).
   
   ## Verification
   
   \`\`\`
   mysql> SELECT WEEK('2023-01-01', 7);          -- 52
   mysql> SELECT WEEKOFYEAR('2022-01-02');        -- 52
   mysql> SELECT WEEKOFYEAR('2023-12-25');        -- 52
   mysql> SELECT weekofyear('1023-01-04');        -- 1
   \`\`\`
   
   ## Test plan
   
   - [x] All added examples verified on Apache Doris 4.1.1.
   - [x] ZH weekofyear typo no longer duplicates the previous example.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to