/*[deutsch]
<p>Erzeugt ein unbegrenztes Intervall bis zum angegebenen
Endedatum. </p>

@param   end     date of upper boundary (inclusive)
@return  new date interval
@since   2.0
439880
public static DateInterval until(PlainDate end) {

        Boundary<PlainDate> past = Boundary.infinitePast();
        return new DateInterval(past, Boundary.of(CLOSED, end));

    }
941999
public com.google.api.ads.admanager.axis.v201808.DateTime getEndDateTime() {
        return endDateTime;
    }
1176675
public static Date beginOfMinute(@NotNull final Date date) {
		return DateUtils.truncate(date, Calendar.MINUTE);
	}
508476
public static LinkedHashSet<String> yearAndQuarter(Date startDate, Date endDate) {
		if (startDate == null || endDate == null) {
			return new LinkedHashSet<String>(0);
		}
		return yearAndQuarter(startDate.getTime(), endDate.getTime());
	}
141260
public Boundary getObservanceBoundary(Date date) {
		utcCalendar.setTime(date);
		int year = utcCalendar.get(Calendar.YEAR);
		int month = utcCalendar.get(Calendar.MONTH) + 1;
		int day = utcCalendar.get(Calendar.DATE);
		int hour = utcCalendar.get(Calendar.HOUR);
		int minute = utcCalendar.get(Calendar.MINUTE);
		int second = utcCalendar.get(Calendar.SECOND);

		return getObservanceBoundary(year, month, day, hour, minute, second);
	}
32467
public void setEnddate(Object enddate) throws PageException {
	if (StringUtil.isEmpty(enddate)) return;
	this.enddate = new DateImpl(DateCaster.toDateAdvanced(enddate, pageContext.getTimeZone()));
    }
929807
@Override
    public MomentInterval between(
        Boundary<Moment> start,
        Boundary<Moment> end
    ) {

        return new MomentInterval(start, end);

    }
105349
public static String formatBetween(Date beginDate, Date endDate) {
		return formatBetween(between(beginDate, endDate, DateUnit.MS));
	}
861213
@Override
    public TimestampInterval between(
        Boundary<PlainTimestamp> start,
        Boundary<PlainTimestamp> end
    ) {

        return new TimestampInterval(start, end);

    }
65244
public void setExpiredEnd(Date expiredEnd) throws InvalidArgumentException {
        if (expiredEnd == null) {
            throw new InvalidArgumentException("Date can't be null");
        }
        queryParms.put("expired_end", Util.dateToString(expiredEnd));
    }
34012
public static Date getRandomDate(Date begin, Date end) {
		return getRandomDate(begin, end, r);
	}
1316127
public static <T extends Comparable<T>> Interval<T> from(final EndPoint.Infinity inf, final T v) throws MIDDException {
        return new Interval<>(inf, v);
    }
206083
public long between(
        PlainDate start,
        PlainDate end
    ) {

        return this.derive(start).between(start, end);

    }
795448
public static Interval plus(final Interval interval, final Period period) {
    return new Interval(interval.getStart().plus(period),
        interval.getEnd().plus(period));
  }
957267
@SuppressWarnings("deprecation")
    protected Date getEndDate(Query query) {
        Instant instant = query.getInstantFilter("Ending");
        if (instant == null)
            return null;
        else {
            Date end = new Date(Date.from(instant).getTime() + DatabaseAccess.getDbTimeDiff());
            if (end.getHours() == 0) {
                end = new Date(end.getTime() + DAY_MS);  // end of day
            }
            return end;
        }
    }
433458
public TimerType<T> end(java.util.Date end)
   {
      if (end != null)
      {
         childNode.getOrCreate("end").text(XMLDate.toXMLFormat(end));
         return this;
      }
      return null;
   }
452924
public static Date getDateEnd(Date date){
        Calendar   ca   =   Calendar.getInstance();
        ca.setTime(date);
        ca.set(Calendar.HOUR, 23);
        ca.set(Calendar.MINUTE, 59);
        ca.set(Calendar.SECOND, 59);
        return  ca.getTime();
    }