class DateTimeFormatter extends BaseDateTimeFormatter {

    @Override
    public void saveNewFormat(String format)
    {
        boolean containsTime = format.contains("H") || format.contains("m") || format.contains("s") || format.contains("S")
                || format.contains("h");
        boolean containsDate = format.contains("y") || format.contains("M") || format.contains("d");
        if (containsTime && containsDate)
        {
            super.saveNewFormat(format);
        }
    }

    public  DateTimeFormatter(PreferencesRegistry preferencesRegistry);

}