protected static String normalize(String text) {

        text = text.toUpperCase(Locale.US);

        //strip out commas
        text = text.replaceAll(",", "");

        //1) strip off extra stuff after +0800, e.g. "Mon, 9 May 2016 7:32:00 UTC+0600 (BST)",
        //2) insert a colon btwn hrs and minutes to avoid a difference in behavior
        // between jdk 8 and jdk 11+17
        Matcher matcher = OFFSET_PATTERN.matcher(text);
        while (matcher.find()) {
            if (matcher.group(1) != null) {
                text = text.substring(0, matcher.start());
                text += matcher.group(1) + StringUtils.leftPad(matcher.group(2), 2, '0') + ":" +
                        matcher.group(3);
                break;
            }
        }

        matcher = LOCALIZED_OFFSET_PATTERN.matcher(text);
        if (matcher.find()) {
            text = buildLocalizedOffset(matcher, text);
        }

        matcher = AM_PM.matcher(text);
        if (matcher.find()) {
            text = matcher.replaceFirst("$1 $2");
        }
        //The rfc_lenient parser had a problem parsing dates
        //with days of week missing and a timezone: 9 May 2016 01:32:00 UTC
        //The day of week is not used in the resolvers, so we may as well throw
        //out that info
        matcher = DAYS_OF_WEEK.matcher(text);
        if (matcher.find()) {
            text = matcher.replaceAll(" ");
        }
        //16 May 2016 at 09:30:32  GMT+1
        text = text.replaceAll("(?i) at ", " ");
        //just cause
        text = text.replaceAll("\\s+", " ").trim();
        return text;
    }
@Test
    public void testNormalization() throws Exception {
        String s = "10-10-2022";
        //make sure that the year does not have ":" inserted
        assertEquals(s, MailDateParser.normalize(s));
    }