Return next day as deadline if no deadline provided.
191211
def deadline(self):
        """"""
        if not self._deadline:
            self._deadline = self.now + timezone.timedelta(days=1)
        return self._deadline
771159
def rollforward(self, date):
        """"""
        if self.onOffset(date):
            return date
        else:
            return date + QuarterEnd(month=self.month)
62093
def next_day(self):
        """"""
        return HDate(self.gdate + datetime.timedelta(1), self.diaspora,
                     self.hebrew)
261992
def deadline=(days)
      unless days == NO_DEADLINE
        days = JSS::Validate.integer(days)
        days = NO_DEADLINE unless days.positive?
      end
      return if days == deadline
      @deadline = days
      @need_to_update = true
    end
194724
def _parse_deadline(deadline):
        """"""
        if '-' in deadline and len(deadline) == 10:
            return deadline

        if '.' in deadline and len(deadline) == 10:  # russian format dd.mm.yyyy to yyyy-mm-dd
            dmy = deadline.split('.')
            if len(dmy) == 3 and all(v is not None for v in dmy):
                return '-'.join(reversed(dmy))

        raise exceptions.RumetrUnparsableDeadline()
58431
public static Deadline soonest(Deadline... deadlines)
	{
		Deadline min = null;

		if (deadlines != null)
			for (Deadline deadline : deadlines)
			{
				if (deadline != null)
				{
					if (min == null)
						min = deadline;
					else if (deadline.getTimeLeft() < min.getTimeLeft())
					{
						min = deadline;
					}
				}
			}

		return min;
	}
883323
def next_weekday(weekday):
    """"""
    ix = WEEKDAYS.index(weekday)
    if ix == len(WEEKDAYS)-1:
        return WEEKDAYS[0]
    return WEEKDAYS[ix+1]
780668
public Deadline minimum(Deadline other) {
    assert this.ticker == other.ticker : "Tickers don't match";
    return isBefore(other) ? this : other;
  }
775120
private void fetchNext() {
        if (null != this.pendingUtc_ || this.done_) {
            return;
        }

        DateValue dUtc = this.generateInstance();

        // check the exit condition
        if (null != dUtc && this.condition_.apply(dUtc)) {
            this.pendingUtc_ = dUtc;
            this.yearGenerator_.workDone();
        } else {
            this.done_ = true;
        }
    }
903495
def after(self, idx):
        """"""
        if not isinstance(idx, datetime):
            raise TypeError("'%s' is not %s" % (idx, datetime))
        day = max(idx.date(), self._lo_limit)
        while day < self._hi_limit:
            if day < self._rd_cache.lo or day >= self._rd_cache.hi:
                self._load(self._rd_cache, day)
            self._rd_cache.set_ptr(idx)
            if self._rd_cache.ptr < len(self._rd_cache.data):
                return self._rd_cache.data[self._rd_cache.ptr]['idx']
            day = self._rd_cache.hi
        return None
992937
public CallOptions withDeadlineAfter(long duration, TimeUnit unit) {
    return withDeadline(Deadline.after(duration, unit));
  }
675763
def wait_ready(self, timeout=120):
        
        deadline = time.time() + timeout
        while time.time() < deadline:
            try:
                self.status()
                return True
            except:
                time.sleep(2)
        return False
1199745
def prepare_date(data, schema):
    """"""
    if isinstance(data, datetime.date):
        return data.toordinal() - DAYS_SHIFT
    else:
        return data
1052457
def tomorrow(self, date_from=None, date_format=None):
		
		# date de demain
		return self.delta(date_from=date_from, date_format=date_format, days=1)
214622
public void executeWithDelay() {
        long now = Clock.currentTimeMillis();
        if (delay + now > hardLimit) {
            scheduleNewExecution(now);
        } else if (!tryPostponeExecution()) {
            scheduleNewExecution(now);
        }
    }
1062634
def onOffset(self, date):
        """"""
        return date.day == _days_in_month(date) and date.month == self.month
393207
def available_on_day(self, day):
        
        if isinstance(day, datetime):
            d = day.date()
        else:
            d = day
        return self.starts_within(d, d)