Sets 'until' parameter used to return \
        only tweets generated before the given date

        :param date: A datetime instance
        :raises: TwitterSearchException
183516
def set_until(self, date):
        

        if isinstance(date, datetime.date) and date <= datetime.date.today():
            self.arguments.update({'until': '%s' % date.strftime('%Y-%m-%d')})
        else:
            raise TwitterSearchException(1007)
49418
public static boolean beforeNow(String date, String format, DateUnit dateUnit) {
        logger.debug("指定日期为：{}", date);
        return calc(new Date(), parse(date, format), dateUnit) > 0;
    }
1051556
public function checkBefore($date, $latest)
    {
        try {
            return $this->toTimestamp($date) < $this->toTimestamp($latest);
        } catch (InvalidArgumentException $e) {
            return false;
        }
    }
541692
def format(self, date):
        
        context = {'date': date}
        for handler in self.format_chain:
            handler(self, date, context)
        return eval(self.format_code, globals(), context)
1055759
def date(self, pattern='%Y-%m-%d', end_datetime=None):
        
        return self.date_time(end_datetime=end_datetime).strftime(pattern)
1264173
def _validate_parse_dates_arg(parse_dates):
    
    msg = ("Only booleans, lists, and "
           "dictionaries are accepted "
           "for the 'parse_dates' parameter")

    if parse_dates is not None:
        if is_scalar(parse_dates):
            if not lib.is_bool(parse_dates):
                raise TypeError(msg)

        elif not isinstance(parse_dates, (list, dict)):
            raise TypeError(msg)

    return parse_dates
219367
def parse_http_date(date: str) -> int:
    
    try:
        return int(
            datetime.strptime(
                date,
                ISO_DATE_FORMAT,
            ).timestamp(),
        )
    except ValueError:
        return 0
354195
def setCurrentDate( self, date ):
        
        if ( date == self._currentDate or not date.isValid() ):
            return
        
        self._currentDate = date
        self.markForRebuild()
        
        parent = self.parent()
        if ( not parent.signalsBlocked() ):
            parent.currentDateChanged.emit(date)
            parent.titleChanged.emit(self.title())
1018457
public static String toLongFormatFromDate(Date date) {
    if (date == null) {
      return null;
    }

    return strategy.formatFor(FACEBOOK_LONG_DATE_FORMAT_WITHOUT_TIMEZONE).format(date);
  }
596804
def index(self, date):
        
        for (i, (start, end, ruler)) in enumerate(self.table):
            if start <= date.jd <= end:
                return i
        return None
2348
def date_line_to_text(self, date_line):
        
        # Changing the date in a dateline is not supported yet, but if it gets implemented someday this will need to be
        # changed
        if date_line._text is not None:
            return date_line._text
        else:
            return date_utils.unicode_strftime(date_line.date, self.date_format)
128255
public static boolean isDateInThePast(final Date date)
	{
		boolean inPast = false;
		final Calendar compare = Calendar.getInstance();
		compare.setTime(date);
		final Calendar now = Calendar.getInstance();
		now.setTime(new Date(System.currentTimeMillis()));
		inPast = now.after(compare);
		return inPast;
	}
386642
def date_in_past(self):
        
        now = datetime.datetime.now()
        return (now.date() > self.date)
1083260
@SuppressWarnings("unchecked")
    public T date( Date... date ) {
        if (checkIfNull(date)) {
            return (T) this;
        }
        date = ensureDateNotTimestamp(date);
        addObjectParameter(DATE_LIST, "date", date);
        return (T) this;
    }
1218246
def next(self):
        """"""
        if self.limit and self.limit == self.num_tweets:
            raise StopIteration

        if self.index >= len(self.results) - 1:
            data = self.method(max_id=self.max_id, parser=RawParser(), *self.args, **self.kargs)

            if hasattr(self.method, '__self__'):
                old_parser = self.method.__self__.parser
                # Hack for models which expect ModelParser to be set
                self.method.__self__.parser = ModelParser()

            # This is a special invocation that returns the underlying
            # APIMethod class
            model = ModelParser().parse(self.method(create=True), data)
            if hasattr(self.method, '__self__'):
                self.method.__self__.parser = old_parser
                result = self.method.__self__.parser.parse(self.method(create=True), data)
            else:
                result = model

            if len(self.results) != 0:
                self.index += 1
            self.results.append(result)
            self.model_results.append(model)
        else:
            self.index += 1
            result = self.results[self.index]
            model = self.model_results[self.index]

        if len(result) == 0:
            raise StopIteration
        # TODO: Make this not dependant on the parser making max_id and
        # since_id available
        self.max_id = model.max_id
        self.num_tweets += 1
        return result
249338
function since(date) {
  if (typeof date !== 'object') {
    return date
  } else if (date.getTime) {
    return Math.floor(date.getTime() / 1000)
  }
  throw TypeError('Expected a date or number')
}
784784
def skip_until(self, regex):
        
        return self.search_full(regex, return_string=False, advance_pointer=True)