Add in the datetimelike methods (as we may have to override the
        superclass).
779969
def _add_datetimelike_methods(cls):
        

        def __add__(self, other):
            # dispatch to ExtensionArray implementation
            result = self._data.__add__(maybe_unwrap_index(other))
            return wrap_arithmetic_op(self, other, result)

        cls.__add__ = __add__

        def __radd__(self, other):
            # alias for __add__
            return self.__add__(other)
        cls.__radd__ = __radd__

        def __sub__(self, other):
            # dispatch to ExtensionArray implementation
            result = self._data.__sub__(maybe_unwrap_index(other))
            return wrap_arithmetic_op(self, other, result)

        cls.__sub__ = __sub__

        def __rsub__(self, other):
            result = self._data.__rsub__(maybe_unwrap_index(other))
            return wrap_arithmetic_op(self, other, result)

        cls.__rsub__ = __rsub__
438908
private OffsetDateTime with(LocalDateTime dateTime, ZoneOffset offset) {
        if (this.dateTime == dateTime && this.offset.equals(offset)) {
            return this;
        }
        return new OffsetDateTime(dateTime, offset);
    }
661477
@Override
    public final <T extends TimePoint<? super U, T>> T subtractFrom(T time) {

        return this.add(time, this, true);

    }
239409
final public void add(long curTime, long val) {
        if (!enabled)
            return;

        lastSampleTime = curTime;
        if (!sync) {
            if (val > max)
                max = val;

            if (count > 0) {
                if (val < min)
                    min = val;
            } else
                min = val; //set min=val for the first time

            /*
             * if (val < min || min < 0)
             * min = val;
             */
            count++;
            total += val;
            sumOfSquares += val * val;
        } else {
            // synchronized ONLY the count updates
            synchronized (this) {
                count++;
                total += val;
            }

            if (val > max)
                max = val;

            if (count > 0) {
                if (val < min)
                    min = val;
            } else
                min = val; //set min=val for the first time

            sumOfSquares += val * val;
        }
    }
191079
public final boolean add(final Date date) {
        if (!this.isUtc() && this.getTimeZone() == null) {
            /* If list hasn't been initialized yet use defaults from the first added date element */
            if (date instanceof DateTime) {
                DateTime dateTime = (DateTime) date;
                if (dateTime.isUtc()) {
                    this.setUtc(true);
                } else {
                    this.setTimeZone(dateTime.getTimeZone());
                }
            }
        }
        if (date instanceof DateTime) {
            DateTime dateTime = (DateTime) date;
            if (isUtc()) {
                dateTime.setUtc(true);
            } else {
                dateTime.setTimeZone(getTimeZone());
            }
        } else if (!Value.DATE.equals(getType())) {
            final DateTime dateTime = new DateTime(date);
            dateTime.setTimeZone(getTimeZone());
            return dates.add(dateTime);
        }
        return dates.add(date);
    }
1274965
def add(self, **kwargs):
        """"""
        return self.from_datetime(
            pendulum.instance(self.datetime()).add(**kwargs)
        )
1152608
public void addListeners()
    {
        super.addListeners();
        this.getMainRecord().getField(AnnivMaster.CALENDAR_CATEGORY_ID).addListener(new InitFieldHandler(this.getRecord(CalendarControl.CALENDAR_CONTROL_FILE).getField(CalendarControl.ANNIVERSARY_CATEGORY_ID)));
    }
351862
def merge_datetime(date, time='', date_format='%d/%m/%Y', time_format='%H:%M'):
    """"""
    day = datetime.strptime(date, date_format)
    if time:
        time = datetime.strptime(time, time_format)
        time = datetime.time(time)
        day = datetime.date(day)
        day = datetime.combine(day, time)
    return day
1121738
public void addExecutionTime(long time) {
		totalTime.increaseByLong(time);
		lastRequest.setValueAsLong(time);
		minTime.setValueIfLesserThanCurrentAsLong(time);
		maxTime.setValueIfGreaterThanCurrentAsLong(time);

	}
3293
@Override
    public ChronoLocalDateTime<D> with(TemporalAdjuster adjuster) {
        return toLocalDate().getChronology().ensureChronoLocalDateTime(super.with(adjuster));
    }
204434
def classes_and_not_datetimelike(*klasses):
    
    return lambda tipo: (issubclass(tipo, klasses) and
                         not issubclass(tipo, (np.datetime64, np.timedelta64)))
1142098
private void addSkeletonClassifierMethod(TypeSpec.Builder type, List<DateTimeData> dataList) {
    Set<String> dates = new LinkedHashSet<>();
    Set<String> times = new LinkedHashSet<>();
    for (DateTimeData data : dataList) {
      for (Skeleton skeleton : data.dateTimeSkeletons) {
        if (isDateSkeleton(skeleton.skeleton)) {
          dates.add(skeleton.skeleton);
        } else {
          times.add(skeleton.skeleton);
        }
      }
    }

    MethodSpec.Builder method = buildSkeletonType(dates, times);
    type.addMethod(method.build());
  }
1040692
public void addExtends(String superType) {
		if (!Strings.isEmpty(superType)) {
			JvmParameterizedTypeReference superTypeRef = newTypeRef(this.container, superType);
			this.sarlInterface.getExtends().add(superTypeRef);
			return;
		}
	}
676140
def _adjust_datetime(self, sampfrom):
        
        if sampfrom:
            dt_seconds = sampfrom / self.fs
            if self.base_date and self.base_time:
                self.base_datetime = datetime.datetime.combine(self.base_date,
                                                               self.base_time)
                self.base_datetime += datetime.timedelta(seconds=dt_seconds)
                self.base_date = self.base_datetime.date()
                self.base_time = self.base_datetime.time()
            # We can calculate the time even if there is no date
            elif self.base_time:
                tmp_datetime = datetime.datetime.combine(
                    datetime.datetime.today().date(), self.base_time)
                self.base_time = (tmp_datetime
                                  + datetime.timedelta(seconds=dt_seconds)).time()
1035936
public DateFuncSup add(DateSeperator d) {
                date.setTime(date.getTime() + d.parse());
                return this;
        }
385476
private void addContraintExamples() {
		add(new WHeading(HeadingLevel.H2, "Date fields with input constraints"));
		WFieldLayout layout = new WFieldLayout();
		layout.setLabelWidth(33);
		add(layout);

		/* mandatory */
		WDateField constrainedDateField = new WDateField();
		constrainedDateField.setMandatory(true);
		layout.addField("Mandatory date field", constrainedDateField);

		/* min date */
		constrainedDateField = new WDateField();
		constrainedDateField.setMinDate(new Date());
		layout.addField("Minimum date today", constrainedDateField);

		/* max date */
		constrainedDateField = new WDateField();
		constrainedDateField.setMaxDate(new Date());
		layout.addField("Maximum date today", constrainedDateField);

		/* auto complete */
		constrainedDateField = new WDateField();
		constrainedDateField.setBirthdayAutocomplete();
		layout.addField("With autocomplete hint", constrainedDateField);
		constrainedDateField = new WDateField();
		constrainedDateField.setAutocompleteOff();
		layout.addField("With autocomplete off", constrainedDateField);
	}
1242666
def add_seconds(self, datetimestr, n):
        
        a_datetime = self.parse_datetime(datetimestr)
        return a_datetime + timedelta(seconds=n)