列举指定日期范围内所有匹配表达式的日期

@param pattern 表达式
@param start 起始时间
@param end 结束时间
@param count 列举数量
@param isMatchSecond 是否匹配秒
@return 日期列表
765093
public static List<Date> matchedDates(CronPattern pattern, long start, long end, int count, boolean isMatchSecond) {
		Assert.isTrue(start < end, "Start date is later than end !");

		final List<Date> result = new ArrayList<>(count);
		long step = isMatchSecond ? DateUnit.SECOND.getMillis() : DateUnit.MINUTE.getMillis();
		for (long i = start; i < end; i += step) {
			if (pattern.match(i, isMatchSecond)) {
				result.add(DateUtil.date(i));
				if (result.size() >= count) {
					break;
				}
			}
		}
		return result;
	}
25762
public static boolean isValid(String date, String pattern) {
        Date d = parseDate(date, pattern);
        return d != null && format(d, pattern).equals(date);
    }
1240799
private static boolean doesNameMatchPattern(final Principal principal, final Pattern pattern) {
        if (pattern != null) {
            val name = principal.getName();
            val result = pattern.matcher(name).matches();
            LOGGER.debug("[{}] matches [{}] == [{}]", pattern.pattern(), name, result);
            return result;
        }
        return true;
    }
1108165
public long countOf(DomainObjectMatch<?> match) {
		long ret;
		Object so = InternalAccess.getQueryExecutor(this.domainQuery).getMappingInfo()
				.getInternalDomainAccess().getSyncObject();
		if (so != null) {
			synchronized (so) {
				ret = intCountOf(match);
			}
		} else
			ret = intCountOf(match);
		return ret;
	}
573150
public static int count(String regex, CharSequence content) {
		if (null == regex || null == content) {
			return 0;
		}

		// Pattern pattern = Pattern.compile(regex, Pattern.DOTALL);
		final Pattern pattern = PatternPool.get(regex, Pattern.DOTALL);
		return count(pattern, content);
	}
371671
public static List<String> getDayListBetween2Day(String startDate, String endDate, Format format) {
        List<String> dayList = new ArrayList<String>();
        int dataNum = Integer.parseInt(getTwoDay2String(startDate, endDate, format));
        for (int i = 0; i < (dataNum + 1); i++) {
            String resultDate = getNextDay2String(startDate, String.valueOf(i), format);
            dayList.add(resultDate);
        }
        return dayList;
    }
646088
public SearchParams between(final Date start, final Date end) {
        return this.creationGte(start).creationLte(end);
    }
1329315
def in_date(objet, pattern):
        
        if objet:
            pattern = re.sub(" ", '', pattern)
            objet_str = abstractRender.date(objet)
            return bool(re.search(pattern, objet_str))
        return False
186332
def check(self, pattern):
        
        if self.eos:
            raise EndOfText()
        if pattern not in self._re_cache:
            self._re_cache[pattern] = re.compile(pattern, self.flags)
        return self._re_cache[pattern].match(self.data, self.pos)
771206
private static boolean isMatchDayOfMonth(ValueMatcher matcher, int dayOfMonth, int month, boolean isLeapYear) {
		return ((matcher instanceof DayOfMonthValueMatcher) //
				? ((DayOfMonthValueMatcher) matcher).match(dayOfMonth, month, isLeapYear) //
				: matcher.match(dayOfMonth));
	}
896080
private boolean exactMatch(String str, int i) {
    int end = str.length() - i;
    for (String p : _patterns) {
      int start = end - p.length();
      if (start >= 0 && str.regionMatches(start, p, 0, p.length())) {
        return true;
      }
    }
    return false;
  }
1260769
public boolean find(Pattern pattern)
    {
        matcher.usePattern(pattern);
        int start = matcher.regionStart();
        if (matcher.find())
        {
            stack.add(new MatchResultImpl(matcher));
            matcher.region(matcher.end(), matcher.regionEnd());
            return true;
        }
        else
        {
            return false;
        }
    }
476731
public static Date parseDate(final String date, final List<String> patterns)
	{
		for (final String pattern : patterns)
		{
			final SimpleDateFormat formatter = new SimpleDateFormat(pattern);
			try
			{
				return formatter.parse(date);
			}
			catch (final ParseException e)
			{
				// Do nothing...
			}
		}
		return null;
	}
16290
public Collection<Event> getEvents(final DateTime start, final DateTime end) {
        final Interval interval = new Interval(start, end);
        final Predicate<Event> withinInterval = new Predicate<Event>() {
            public boolean apply(Event input) {
                return interval.contains(input.getStart());
            }
        };
        final Collection<Event> values = eventById.values();
        return Collections2.filter(values, withinInterval);
    }
893004
public int count(List<Match> matches) {

        Query query = queryGenerator.getCountQuery(matches);
        // 执行操作
        String sql = query.getSql();
        return countBySQL(sql, query.getParams());
    }
196761
public boolean isMatch(int count) {
        if (a == 0) {
            return count == b;
        } else if (a > 0) {
            if (count < b) {
                return false;
            }

            return (count - b) % a == 0;
        } else {
            if (count > b) {
                return false;
            }

            return (b - count) % (-a) == 0;
        }
    }
1061051
@Override
    public boolean isBetween(Date start, Date end) {
        return rule.isBetween(start, end);
    }