class YMDNewYearDateFilter extends NewYearDateFilter {

  private final YMDDateHelper ymdDateHelper = new YMDDateHelper();

  @Override
  public RuleMatch acceptRuleMatch(RuleMatch match, Map<String, String> args, int patternTokenPos, AnalyzedTokenReadings[] patternTokens, List<Integer> tokenPositions) {<FILL_FUNCTION_BODY>}

}

    if (args.containsKey("year") || args.containsKey("month") || args.containsKey("day")) {
      throw new RuntimeException("Set only 'weekDay' and 'date' for " + YMDDateCheckFilter.class.getSimpleName());
    }
    args = ymdDateHelper.parseDate(args);
    return super.acceptRuleMatch(ymdDateHelper.correctDate(match, args), args, patternTokenPos, patternTokens, tokenPositions);
  
<methods>public non-sealed void <init>() <variables>private final org.languagetool.rules.en.DateFilterHelper dateFilterHelper