Adds a number of business days to the source date.
964846
def _add_business_days(p_sourcedate, p_bdays):
    
    result = p_sourcedate
    delta = 1 if p_bdays > 0 else -1

    while abs(p_bdays) > 0:
        result += timedelta(delta)

        weekday = result.weekday()
        if weekday >= 5:
            continue

        p_bdays = p_bdays - 1 if delta > 0 else p_bdays + 1

    return result
1223980
def _days_in_month(date):
    """"""
    if date.month == 12:
        reference = type(date)(date.year + 1, 1, 1)
    else:
        reference = type(date)(date.year, date.month + 1, 1)
    return (reference - timedelta(days=1)).day
606158
public void setWeeklyDay(Day day, boolean value)
   {
      if (value)
      {
         m_days.add(day);
      }
      else
      {
         m_days.remove(day);
      }
   }
1251670
public void setDaysExcluded (final ArrayList <Calendar> days)
  {
    if (days == null)
    {
      m_aExcludeDays = new ArrayList <> ();
    }
    else
    {
      m_aExcludeDays = days;
    }

    m_bDataSorted = false;
  }
1004586
private void addEntryToResult(Map<LocalDate, List<Entry<?>>> result, Entry<?> entry, LocalDate startDate, LocalDate endDate) {
        LocalDate entryStartDate = entry.getStartDate();
        LocalDate entryEndDate = entry.getEndDate();

        // entry does not intersect with time interval
        if (entryEndDate.isBefore(startDate) || entryStartDate.isAfter(endDate)) {
            return;
        }

        if (entryStartDate.isAfter(startDate)) {
            startDate = entryStartDate;
        }

        if (entryEndDate.isBefore(endDate)) {
            endDate = entryEndDate;
        }

        LocalDate date = startDate;
        do {
            result.computeIfAbsent(date, it -> new ArrayList<>()).add(entry);
            date = date.plusDays(1);
        } while (!date.isAfter(endDate));
    }
984909
function addTerm (date, value) {
  if ('d' in value || 'h' in value || 'i' in value ||
      's' in value || 'ms' in value) {
    return new Date(
      date.getFullYear()     + (value.y  || 0),
      date.getMonth()        + (value.m  || 0),
      date.getDate()         + (value.d  || 0),
      date.getHours()        + (value.h  || 0),
      date.getMinutes()      + (value.i  || 0),
      date.getSeconds()      + (value.s  || 0),
      date.getMilliseconds() + (value.ms || 0)
    );
  } else if ('y' in value || 'm' in value) {
    var y = date.getFullYear() + (value.y  || 0);
    var m = date.getMonth() + (value.m  || 0);
    var d = Math.min(new Date(y, m + 1, 0).getDate(), date.getDate());
    return new Date(
      y,
      m,
      d,
      date.getHours(),
      date.getMinutes(),
      date.getSeconds(),
      date.getMilliseconds()
    );
  } else {
    return date;
  }
}
55716
public static LocalDateTime addDays(String localDate, long days) {
        LocalDateTime parse = parse(localDate, DEFAULT_PATTERN);
        return parse.plusDays(days);
    }
1179765
public void addFloatingDate(ICalProperty property, ICalDate date) {
		floatingDates.add(new TimezonedDate(date, property));
	}
582066
public static <D extends Comparable> DateExpression<D> addDays(DateExpression<D> date, int days) {
        return Expressions.dateOperation(date.getType(), Ops.DateTimeOps.ADD_DAYS, date, ConstantImpl.create(days));
    }
788093
def subtract_business_days(date, delta)
      date = roll_backward(date)
      delta.times do
        begin
          date -= day_interval_for(date)
        end until business_day?(date)
      end
      date
    end
700006
public static Calendar addWeeks(Calendar origin, int value) {
        Calendar cal = sync((Calendar) origin.clone());
        cal.add(Calendar.WEEK_OF_YEAR, value);
        return sync(cal);
    }
84850
def date_added(self, date_added):
        """"""
        self._group_data['dateAdded'] = self._utils.format_datetime(
            date_added, date_format='%Y-%m-%dT%H:%M:%SZ'
        )
1144102
def business_date(self, business_date):
        
        if business_date is not None:
            if isinstance(business_date, type_check):
                self._business_date = parse(business_date).date()
            else:
                self._business_date= business_date
1279763
def timestamp_from_business_day(days)
      return unless days
      date = DateTime.now.utc

      days.times do
        date += 1.day

        date += 2.days if date.saturday?
        date += 1.day if date.sunday?
      end

      date.to_datetime
    end
1174001
public void addValue(Date date) {
        String dateString = XmppDateTime.formatXEP0082Date(date);
        addValue(dateString);
    }
1121667
public static Calendar addSeconds(Calendar origin, int value) {
        Calendar cal = sync((Calendar) origin.clone());
        cal.add(Calendar.SECOND, value);
        return sync(cal);
    }
460290
public static function addDays($date, $days) {
        if (Validator::isDateTime($date) === false) throw new InvalidArgumentException('Invalid argument $date: '.$date);
        if (!is_int($days))                         throw new IllegalTypeException('Illegal type of parameter $days: '.gettype($days));

        $parts = explode('-', $date);
        $year  = (int) $parts[0];
        $month = (int) $parts[1];
        $day   = (int) $parts[2];

        return date('Y-m-d', mktime(0, 0, 0, $month, $day+$days, $year));
    }