private static void visitYearToken(int repetitions, JQueryDateTimePatternBuilder builder) {
        if (repetitions == 2) {
            builder.appendYearTwoDigits();
        }
        else {
            builder.appendYearFourDigits();
        }
    }
Year token 'Y', 'YY, 'YYY, 'YYYY'. 'YY' is the short year (truncated to two
digits), everything else is a full year. Also allows 'u' (to support
{@link DateTimeFormatter}) and 'Y'.
primefaces/src/main/java/org/primefaces/convert/CombinedDateTimePatternTokenVisitor.java