private static Consumer<DateTimeParserContext> numberNthWeekDay() {
        return ctx -> {
            long value = ctx.readLongAt(ctx.cursor().value() - 2);
            DayOfWeek currentDow = Adjusters.dayOfWeek(ctx.readStringAtCursor());
            DayOfWeek dayOfWeek = ctx.dateTime().withDayOfMonth(Math.toIntExact(value)).getDayOfWeek();

            if (currentDow != dayOfWeek) {
                ctx.withAdjuster(dayOfWeekInMonth(Math.toIntExact(value), currentDow), ChronoField.DAY_OF_WEEK);
            } else {
                ctx.setDayOfMonth(value);
            }
        };
    }
The base time for relative statements.
exts/jphp-zend-ext/src/main/java/org/develnext/jphp/zend/ext/standard/date/DateTimeParser.java