Bug #33333 Returns the month for date, in the range 0 to 12 (13 steps for 12 month?)
Submitted: 18 Dec 2007 14:39 Modified: 19 Dec 2007 17:43
Reporter: Susanne Ebrecht Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[18 Dec 2007 14:39] Susanne Ebrecht
Description:
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html

"MONTH(date)

Returns the month for date, in the range 0 to 12." 

From 0 to 12, that are 13 steps. A year only has 12 months.

My German co workers and me needed a little bit to figure out, that 0 isn't January and 11 is November and not December. We also figured out, that 0 is the result, when you have the date: '2007-00-01".

It would be nice, to document this more specific. Something like:

"Returns the month for date, in the range 0 to 12. Here, 1 is January and 12 is December. It returns 0 for '0000-00-00'."

How to repeat:
See above.

Suggested fix:
Just make a more specific description.
[19 Dec 2007 17:43] 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 products.

Fixed MONTH() description (and also DAYOFMONTH()), which behaves similarly.