public static String getValueAsString(FacesContext context, UICalendar calendar, Object value, String pattern, boolean ignoreConverter) {
        if (value == null) {
            return null;
        }

        if (value instanceof List) {
            StringBuilder valuesAsString = new StringBuilder();
            String separator = "multiple".equals(calendar.getSelectionMode()) ? "," : " " + calendar.getRangeSeparator() + " ";
            List<?> values = ((List) value);

            for (int i = 0; i < values.size(); i++) {
                if (i != 0) {
                    valuesAsString.append(separator);
                }

                valuesAsString.append(getValue(context, calendar, values.get(i), pattern, ignoreConverter));
            }

            return valuesAsString.toString();
        }
        else {
            return getValue(context, calendar, value, pattern, ignoreConverter);
        }
    }
Try to convert the given value to an {@link Instant} or return <code>null</code> if there is no appropriate converter for doing so.
The type of the value must be one of {@link LocalDateTime}, {@link LocalDate}, {@link LocalTime}, {@link Date} (deprecated),
or a parsable date or time {@link String}. For any other this method throws a {@link FacesException}.
@param context the faces context
@param calendar the calendar component
@param value the value to convert
@param attributeName the attribute name of the value (e.g. mindate, or maxdate)
@return the {@link Instant} object or <code>null</code>
@throws FacesException if value type is not supported
primefaces/src/main/java/org/primefaces/util/CalendarUtils.java