Bug #8105 | Description of 'mode' parameter in WEEK() function incorrect | ||
---|---|---|---|
Submitted: | 24 Jan 2005 10:53 | Modified: | 26 Jan 2005 16:27 |
Reporter: | Frank Maas (Basic Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | current | OS: | not relevant |
Assigned to: | Paul DuBois | CPU Architecture: | Any |
[24 Jan 2005 10:53]
Frank Maas
[24 Jan 2005 11:25]
Frank Maas
Changed version as I am viewing the documentation that is presented via the MySQL website and that reports version 5.0.3 as the version for the documentation.
[26 Jan 2005 16:27]
Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant product(s). Additional info: A little experimentation with the -01-01 and -12-31 days of several different years reveals that the ranges in the table (0-53, 1-53) are correct. However, the ranges listed in the preceding paragraph (0 to 53 or 1 to 52) is not correct. It should say 0 to 53 or 1 to 53. I've changed that. Thanks for the report.
[26 Jan 2005 20:31]
Frank Maas
Paul, Thanks for testing and adapting the documentation. But your additional information had me puzzled. As years tend to have 52 or 53 weeks, the range 0-53 seems strange. So I experimented a bit and got hold of the meaning, but I would suggest to elaborate a bit more on this subject in the documentation. My suggestion would be to add a phrase saying something like this: "If you choose a mode that returns a value in the range 0-53 then the result will be the weeknumber of the year in which <date> falls; the first days of the year always return 0 or 1. The range 1-53 always returns the 'real world' weeknumber, which might be 52 or 53 for the first days of the year." HTH