Bug #65017 Date and time functions are not consistently named
Submitted: 17 Apr 2012 23:41 Modified: 18 Apr 2012 4:15
Reporter: Dimitriy A Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.0, 5.1, 5.5 OS:Any
Assigned to: CPU Architecture:Any
Tags: date, FUNCTION, inconsistent, time
Triage: Needs Triage: D5 (Feature request)

[17 Apr 2012 23:41] Dimitriy A
Description:
Date and time functions are inconsistently named. It makes it difficult to recall what the function name should be without looking up the manual every time.

For example, this is one flavor of naming convention (verb in front):
ADDDATE()
ADDTIME()
SUBDATE()
SUBTIME()

Here is another one (note the use of underscores):
DATE_ADD()
DATE_SUB()
PERIOD_ADD()
PERIOD_DIFF()

Third flavor (verb at the end):
DATEDIFF()
TIMEDIFF()
TIMESTAMPADD()
TIMESTAMPDIFF()

Also note the use of SUB and DIFF for referring to subtraction of values.

How to repeat:
N/A

Suggested fix:
Function names need to have standard naming convention.
Possible solutions are to rename functions or create synonyms.
[17 Apr 2012 23:50] Dimitriy A
I am aware that functions these functions are different. For example, some add intervals and some add actual values. That means that functions need better names.

For example, there is ADDDATE function:
ADDDATE(date,INTERVAL expr unit), ADDDATE(expr,days)

A better name might be ADD_DATE_INTERVAL or ADD_DATE_INTRVL.
[18 Apr 2012 4:15] Valeriy Kravchuk
As you ask to change already created and documented functions (or create new ones with better names), this is a new feature request.