code: @Override
      public void setAsText(String text) {
          if (BeanUtils.isNull(text)) {
              setValue(null);
              return;
          }
          ParseException pe = null;
  
          for (int i = 0; i < formats.length; i++) {
              try {
                  // try to parse the date
                  DateFormat df = formats[i];
                  Date date = df.parse(text);
  
                  // store the date in both forms
                  this.text = text;
                  super.setValue(date);
  
                  // done
                  return;
              } catch (ParseException e) {
                  // remember the last seen exception
                  pe = e;
              }
          }
          // couldn't parse
          throw new IllegalArgumentException("Failed to parse to Date!", pe);
      }
docs: Parse the text into a java.util.Date by trying one by one the registered DateFormat(s).
  
  @param text the string date