Returns an extended filter with the end date restriction.<p>

@param to the end date to filter

@return an extended filter with the end date restriction
347005
public CmsLogFilter filterTo(long to) {

        CmsLogFilter filter = (CmsLogFilter)clone();
        filter.m_dateTo = to;
        return filter;
    }
985860
@Override
    public long until(Temporal endExclusive, TemporalUnit unit) {
        Objects.requireNonNull(endExclusive, "endExclusive");
        @SuppressWarnings("unchecked")
        ChronoZonedDateTime<D> end = (ChronoZonedDateTime<D>) getChronology().zonedDateTime(endExclusive);
        if (unit instanceof ChronoUnit) {
            end = end.withZoneSameInstant(offset);
            return dateTime.until(end.toLocalDateTime(), unit);
        }
        Objects.requireNonNull(unit, "unit");
        return unit.between(this, end);
    }
439880
public static DateInterval until(PlainDate end) {

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

    }
592246
@SuppressWarnings("unchecked")
  public <T extends RequestFilter> T requestFilter(String name) {
    return (T) requestFilters.get(name);
  }
525415
public CmsResourceFilter addRequireExpireAfter(long time) {

        CmsResourceFilter extendedFilter = (CmsResourceFilter)clone();

        extendedFilter.m_filterExpire = true;
        extendedFilter.m_expireAfter = time;
        extendedFilter.updateCacheId();

        return extendedFilter;
    }
190761
public CmsVisitEntryFilter filterFrom(long from) {

        CmsVisitEntryFilter filter = (CmsVisitEntryFilter)clone();
        filter.m_dateFrom = from;
        return filter;
    }
1171985
public Subscription endTrialAt( String subscription, Date date ) {
    return this.endTrialAt( new Subscription( subscription ), date );
  }
431282
public static Date getDateFromLong(long date)
   {
      TimeZone tz = TimeZone.getDefault();
      return (new Date(date - tz.getRawOffset()));
   }
215176
@Override
    public Temporal addTo(Temporal temporal) {
        validateChrono(temporal);
        if (months == 0) {
            if (years != 0) {
                temporal = temporal.plus(years, YEARS);
            }
        } else {
            long monthRange = monthRange();
            if (monthRange > 0) {
                temporal = temporal.plus(years * monthRange + months, MONTHS);
            } else {
                if (years != 0) {
                    temporal = temporal.plus(years, YEARS);
                }
                temporal = temporal.plus(months, MONTHS);
            }
        }
        if (days != 0) {
            temporal = temporal.plus(days, DAYS);
        }
        return temporal;
    }
361085
public CmsRelationFilter filterInternal() {

        CmsRelationFilter filter = (CmsRelationFilter)clone();
        if (filter.m_types.isEmpty()) {
            filter.m_types.addAll(CmsRelationType.getAllInternal());
        } else {
            filter.m_types = new HashSet<CmsRelationType>(CmsRelationType.filterInternal(filter.m_types));
        }
        return filter;
    }
1019233
public Date getExpirationDateAsDate()
  {
    if (hasExpirationDate())
    {
      final LocalDateTime endOfMonth = expirationDate.atEndOfMonth()
        .atStartOfDay().plus(1, ChronoUnit.DAYS).minus(1, ChronoUnit.NANOS);
      final Instant instant = endOfMonth.atZone(ZoneId.systemDefault())
        .toInstant();
      final Date date = new Date(instant.toEpochMilli());
      return date;
    }
    else
    {
      return null;
    }
  }
745128
public I_CmsListDateRestriction parse(CmsXmlContentValueLocation dateRestriction) {

        I_CmsListDateRestriction result = null;
        result = parseRange(dateRestriction);
        if (result != null) {
            return result;
        }
        result = parseFromToday(dateRestriction);
        if (result != null) {
            return result;
        }
        result = parsePastFuture(dateRestriction);
        return result;
    }
300816
public List<T> get(long from, long to) {
        if(from > to)
            throw new IllegalArgumentException("from (" + from + ") has to be <= to (" + to + ")");
        List<T> retval=null;
        for(long i=from; i <= to; i++) {
            T element=get(i);
            if(element != null) {
                if(retval == null)
                    retval=new ArrayList<>();
                retval.add(element);
            }
        }
        return retval;
    }
310436
public CmsResourceFilter addRequireLastModifiedAfter(long time) {

        CmsResourceFilter extendedFilter = (CmsResourceFilter)clone();

        extendedFilter.m_filterLastModified = true;
        extendedFilter.m_modifiedAfter = time;
        extendedFilter.updateCacheId();

        return extendedFilter;
    }
1146808
public CmsRelationFilter filterUserDefined() {

        CmsRelationFilter filter = (CmsRelationFilter)clone();
        if (filter.m_types.isEmpty()) {
            filter.m_types.addAll(CmsRelationType.getAllUserDefined());
        } else {
            filter.m_types = new HashSet<CmsRelationType>(CmsRelationType.filterUserDefined(filter.m_types));
        }
        return filter;
    }
1239283
public Date getEndDate()
    {
        if ((m_startTime != null) && (m_endTime != null))
        {
            if (m_endTime.before(m_startTime))
                return m_startTime;
        }
        return m_endTime;
    }
1191734
public static <T extends Comparable<? super T>> Predicates<T> betweenInclusive(T from, T to)
    {
        Predicates.failIfDifferentTypes(from, to);
        return new BetweenInclusive<T>(from, to);
    }