code: def coerce_to_pendulum_date(x: PotentialDatetimeType,
                              assume_local: bool = False) -> Optional[Date]:
      
      p = coerce_to_pendulum(x, assume_local=assume_local)
      return None if p is None else p.date()
docs: Converts something to a :class:`pendulum.Date`.
  
      Args:
          x: something that may be coercible to a date
          assume_local: if ``True``, assume local timezone; if ``False``, assume
              UTC
  
      Returns:
          a :class:`pendulum.Date`, or ``None``.
  
      Raises:
          pendulum.parsing.exceptions.ParserError: if a string fails to parse
          ValueError: if no conversion possible