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
977592
public CmsVisitEntryFilter filterTo(long to) {

        CmsVisitEntryFilter filter = (CmsVisitEntryFilter)clone();
        filter.m_dateTo = to;
        return filter;
    }
565418
@Override
	public Filter getFilter() {
		Filter filter = new Filter() {
			@Override
			protected FilterResults performFiltering(CharSequence constraint) {
				ArrayList<Pair<String, ?>> filteredPrefs = new ArrayList<Pair<String, ?>>();
				FilterResults filterFriends = new FilterResults();
				if (!SharedPreferenceUtils.isEmptyString(constraint)) {
					for (Pair<String, ?> keyValue : keyValSet) {
						String constraintString = constraint.toString();
						String prefixKey = "key: ";
						String prefixValue = "value: ";
						String first = keyValue.first;
						Object second = keyValue.second;
						if (constraintString.toLowerCase().startsWith(prefixKey)) {
							if (first.toLowerCase().contains(constraintString.toLowerCase().substring(prefixKey.length()))) {
								filteredPrefs.add(keyValue);
							}
						} else if (constraintString.toLowerCase().startsWith(prefixValue)) {
							if (second != null) {
								if (second.toString().contains(constraintString.toLowerCase().substring(prefixValue.length()))) {
									filteredPrefs.add(keyValue);
								}
							}
						} else {
							if (first.equalsIgnoreCase(constraintString) || (second != null && second.toString()
							                                                                         .equalsIgnoreCase(constraintString))) {
								filteredPrefs.add(keyValue);
							}
						}
					}
				} else {
					filteredPrefs = keyValSet;
				}
				filterFriends.count = filteredPrefs.size();
				filterFriends.values = filteredPrefs;
				return filterFriends;
			}

			@Override
			protected void publishResults(CharSequence constraint, FilterResults results) {
				filteredCollection = (ArrayList<Pair<String, ?>>) results.values;

				notifyDataSetChanged();
			}
		};
		return filter;
	}
1192372
public CmsSolrQuery getQuery(CmsObject cms) {

        final CmsSolrQuery query = new CmsSolrQuery();

        // set categories
        query.setCategories(m_categories);

        // set container types
        if (null != m_containerTypes) {
            query.addFilterQuery(CmsSearchField.FIELD_CONTAINER_TYPES, m_containerTypes, false, false);
        }

        // Set date created time filter
        query.addFilterQuery(
            CmsSearchUtil.getDateCreatedTimeRangeFilterQuery(
                CmsSearchField.FIELD_DATE_CREATED,
                getDateCreatedRange().m_startTime,
                getDateCreatedRange().m_endTime));

        // Set date last modified time filter
        query.addFilterQuery(
            CmsSearchUtil.getDateCreatedTimeRangeFilterQuery(
                CmsSearchField.FIELD_DATE_LASTMODIFIED,
                getDateLastModifiedRange().m_startTime,
                getDateLastModifiedRange().m_endTime));

        // set scope / folders to search in
        m_foldersToSearchIn = new ArrayList<String>();
        addFoldersToSearchIn(m_folders);
        addFoldersToSearchIn(m_galleries);
        setSearchFolders(cms);
        query.addFilterQuery(
            CmsSearchField.FIELD_PARENT_FOLDERS,
            new ArrayList<String>(m_foldersToSearchIn),
            false,
            true);

        if (!m_ignoreSearchExclude) {
            // Reference for the values: CmsGallerySearchIndex.java, field EXCLUDE_PROPERTY_VALUES
            query.addFilterQuery(
                "-" + CmsSearchField.FIELD_SEARCH_EXCLUDE,
                Arrays.asList(
                    new String[] {
                        A_CmsSearchIndex.PROPERTY_SEARCH_EXCLUDE_VALUE_ALL,
                        A_CmsSearchIndex.PROPERTY_SEARCH_EXCLUDE_VALUE_GALLERY}),
                false,
                true);
        }

        // set matches per page
        query.setRows(new Integer(m_matchesPerPage));

        // set resource types
        if (null != m_resourceTypes) {
            List<String> resourceTypes = new ArrayList<>(m_resourceTypes);
            if (m_resourceTypes.contains(CmsResourceTypeFunctionConfig.TYPE_NAME)
                && !m_resourceTypes.contains(CmsXmlDynamicFunctionHandler.TYPE_FUNCTION)) {
                resourceTypes.add(CmsXmlDynamicFunctionHandler.TYPE_FUNCTION);
            }
            query.setResourceTypes(resourceTypes);
        }

        // set result page
        query.setStart(new Integer((m_resultPage - 1) * m_matchesPerPage));

        // set search locale
        if (null != m_locale) {
            query.setLocales(CmsLocaleManager.getLocale(m_locale));
        }

        // set search words
        if (null != m_words) {
            query.setQuery(m_words);
        }

        // set sort order
        query.setSort(getSort().getFirst(), getSort().getSecond());

        // set result collapsing by id
        query.addFilterQuery("{!collapse field=id}");

        query.setFields(CmsGallerySearchResult.getRequiredSolrFields());

        if ((m_allowedFunctions != null) && !m_allowedFunctions.isEmpty()) {
            String functionFilter = "((-type:("
                + CmsXmlDynamicFunctionHandler.TYPE_FUNCTION
                + " OR "
                + CmsResourceTypeFunctionConfig.TYPE_NAME
                + ")) OR (id:(";
            Iterator<CmsUUID> it = m_allowedFunctions.iterator();
            while (it.hasNext()) {
                CmsUUID id = it.next();
                functionFilter += id.toString();
                if (it.hasNext()) {
                    functionFilter += " OR ";
                }
            }
            functionFilter += ")))";
            query.addFilterQuery(functionFilter);
        }

        return query;
    }
1055619
@Override
    public long until(Temporal endExclusive, TemporalUnit unit) {
        Objects.requireNonNull(endExclusive, "endExclusive");
        ChronoLocalDate end = getChronology().date(endExclusive);
        if (unit instanceof ChronoUnit) {
            switch ((ChronoUnit) unit) {
                case DAYS: return daysUntil(end);
                case WEEKS: return daysUntil(end) / 7;
                case MONTHS: return monthsUntil(end);
                case YEARS: return monthsUntil(end) / 12;
                case DECADES: return monthsUntil(end) / 120;
                case CENTURIES: return monthsUntil(end) / 1200;
                case MILLENNIA: return monthsUntil(end) / 12000;
                case ERAS: return end.getLong(ERA) - getLong(ERA);
            }
            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
        }
        Objects.requireNonNull(unit, "unit");
        return unit.between(this, end);
    }
525309
function filterMonth(arr, year, disabledDateObj) {
  const minDateTime = new Date(year, 0, 1).getTime();
  const maxDateTime = new Date(year, 11, 31).getTime();
  const monthRangeArr = getDateRangeArr(disabledDateObj, minDateTime, maxDateTime);
  const monthArr = [];
  monthRangeArr.forEach((item) => {
    let { start, end } = item;
    start = new Date(start);
    end = new Date(end);

    const monthStart = start.getMonth();
    const monthEnd = end.getMonth();
    const dayStart = start.getDate();
    const dayEnd = new Date(end.getTime() + 86400000).getDate();
    if (dayStart === 1) {
      if (dayEnd === 1) {
        for (let i = monthStart; i <= monthEnd; i++) {
          monthArr.push(i);
        }
      } else {
        for (let i = monthStart; i < monthEnd; i++) {
          monthArr.push(i);
        }
      }
    }
    if (dayEnd === 1) {
      for (let i = monthStart + 1; i <= monthEnd; i++) {
        monthArr.push(i);
      }
    } else {
      for (let i = monthStart + 1; i < monthEnd; i++) {
        monthArr.push(i);
      }
    }
  });
  return arr.filter((item) => {
    const month = item.value;
    return monthArr.indexOf(month) === -1;
  });
}
230856
public static <T extends Comparable<? super T>> Predicates<T> betweenInclusiveTo(T from, T to)
    {
        Predicates.failIfDifferentTypes(from, to);
        return new BetweenInclusiveTo<T>(from, to);
    }
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);
    }
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);
    }
162164
public static long between(Date beginDate, Date endDate, DateUnit unit, boolean isAbs) {
		return new DateBetween(beginDate, endDate, isAbs).between(unit);
	}
127446
public static Date beginOfDate(@NotNull final Date date) {
		return DateUtils.truncate(date, Calendar.DATE);
	}
206083
public long between(
        PlainDate start,
        PlainDate end
    ) {

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

    }
1111756
public CmsResourceFilter addRequireTimerange() {

        CmsResourceFilter extendedFilter = (CmsResourceFilter)clone();

        extendedFilter.m_filterTimerange = true;
        extendedFilter.updateCacheId();

        return extendedFilter;
    }
525415
public CmsResourceFilter addRequireExpireAfter(long time) {

        CmsResourceFilter extendedFilter = (CmsResourceFilter)clone();

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

        return extendedFilter;
    }
1171985
public Subscription endTrialAt( String subscription, Date date ) {
    return this.endTrialAt( new Subscription( subscription ), date );
  }
363272
public CmsResourceFilter addRequireReleaseAfter(long time) {

        CmsResourceFilter extendedFilter = (CmsResourceFilter)clone();

        extendedFilter.m_filterRelease = true;
        extendedFilter.m_releaseAfter = time;
        extendedFilter.updateCacheId();

        return extendedFilter;
    }
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;
    }
  }
747302
public static <T extends Comparable<? super T>> Predicates<T> betweenExclusive(T from, T to)
    {
        Predicates.failIfDifferentTypes(from, to);
        return new BetweenExclusive<T>(from, to);
    }