docs: public static Date getObjectAsDate(FacesContext context, UICalendar calendar, Object value) {
          if (value == null) {
              return null;
          }
  
          if (value instanceof Date) {
              return (Date) value;
          }
  
          String pattern = calendar.calculatePattern();
          if (pattern != null) {
              Locale locale = calendar.calculateLocale(context);
              if (locale != null) {
                  SimpleDateFormat dateFormat = new SimpleDateFormat(pattern, locale);
                  try {
                      return dateFormat.parse(value.toString());
                  }
                  catch (ParseException ex) {
                      // NO-OP
                  }
              }
          }
  
          if (calendar.getConverter() != null) {
              try {
                  Object obj = calendar.getConverter().getAsObject(context, calendar, value.toString());
                  if (obj instanceof Date) {
                      return (Date) obj;
                  }
              }
              catch (ConverterException ex) {
                  // NO-OP
              }
          }
  
          Converter converter = context.getApplication().createConverter(value.getClass());
          if (converter != null) {
              Object obj = converter.getAsObject(context, calendar, value.toString());
              if (obj instanceof Date) {
                  return (Date) obj;
              }
          }
  
          // TODO Currently we do not support conversion of jquery datepicker's special dates like 'today' or '+1m +7d'
          // See http://api.jqueryui.com/datepicker/#option-maxDate, https://github.com/primefaces/primefaces/issues/4621
  
          return null;
      }