def get_param_as_date(self, name, format_string='%Y-%m-%d',
                          required=False, store=None):
        """Return the value of a query string parameter as a date.

        Args:
            name (str): Parameter name, case-sensitive (e.g., 'ids').
            format_string (str): String used to parse the param value into a
                date.
                Any format recognized by strptime() is supported.
                (default ``"%Y-%m-%d"``)
            required (bool, optional): Set to ``True`` to raise
                ``HTTPBadRequest`` instead of returning ``None`` when the
                parameter is not found (default ``False``).
            store (dict, optional): A ``dict``-like object in which to place
                the value of the param, but only if the param is found (default
                ``None``).
        Returns:
            datetime.date: The value of the param if it is found and can be
                converted to a ``date`` according to the supplied format
                string. If the param is not found, returns ``None`` unless
                required is ``True``.

        Raises:
            HTTPBadRequest: A required param is missing from the request.
            HTTPInvalidParam: A transform function raised an instance of
                ``ValueError``.
        """

        param_value = self.get_param(name, required=required)

        if param_value is None:
            return None

        try:
            date = strptime(param_value, format_string).date()
        except __HOLE__:
            msg = 'The date value does not match the required format'
            raise HTTPInvalidParam(msg, name)

        if store is not None:
            store[name] = date

        return date
dataset/ETHPy150Open falconry/falcon/falcon/request.py/Request.get_param_as_date