Item_func has this method:
which now handles DATE and DATETIME data types.
MDEV-16991, it won't be possible to have this method, because DATE and DATETIME will have different rounding behavior.
Under terms of this fact, the following changes will be done:
1. get_arg0_date() will be removed
2. All get_arg0_date() calls will be replaced to instantiation of Date or Datetime (depending on the data type needed) and accessing their members through various methods.
3. To simplify the code in item_timefunc.cc and to reuse some duplicate code, the following methods will be added into Date and/or Datetime: