docs: private static Date parseUsingMask(final String[] masks, String sDate, final Locale locale) {
          if (sDate != null) {
              sDate = sDate.trim();
          }
          ParsePosition pp = null;
          Date d = null;
          for (int i = 0; d == null && i < masks.length; i++) {
              final DateFormat df = new SimpleDateFormat(masks[i], locale);
              // df.setLenient(false);
              df.setLenient(true);
              try {
                  pp = new ParsePosition(0);
                  d = df.parse(sDate, pp);
                  if (pp.getIndex() != sDate.length()) {
                      d = null;
                  }
              } catch (final Exception ex1) {
              }
          }
          return d;
      }