docs: def to_date(dt, tzinfo=None, format=None):
      """
      Convert a datetime to date with tzinfo
      """
      d = to_datetime(dt, tzinfo, format)
      if not d:
          return d
      return date(d.year, d.month, d.day)