docs: def end_of_day(val):
      """
      Return a new datetime.datetime object with values that represent
      a end of a day.
      :param val: Date to ...
      :type val: datetime.datetime | datetime.date
      :rtype: datetime.datetime
      """
      if type(val) == date:
          val = datetime.fromordinal(val.toordinal())
      return start_of_day(val) + timedelta(days=1, microseconds=-1)