code: public static String selectMomentJSDateTimeFormat(Locale locale, String momentJSFormat, boolean withDate, boolean withTime) {
  		if (momentJSFormat == null) {
  			String dateFormat = "";
  			if (withDate) {
  				dateFormat = ((SimpleDateFormat) DateFormat.getDateInstance(DateFormat.SHORT, locale)).toPattern();
  			}
  			String timeFormat = "";
  			if (withTime) {
  				timeFormat = ((SimpleDateFormat)DateFormat.getTimeInstance(DateFormat.MEDIUM, locale)).toPattern();
  			}
  			// Since DateFormat.SHORT is silly, return a smart format
  			if (dateFormat.equals("M/d/yy")) {
  				dateFormat = "MM/dd/yyyy";
  			}
  			else if (dateFormat.equals("d/M/yy")) {
  				dateFormat = "dd/MM/yyyy";
  			}
  			String result = LocaleUtils.javaToMomentFormat((dateFormat + " " + timeFormat).trim());
  //			System.out.println(result);
  			return result;
  		} else {
  			return momentJSFormat;
  		}
  	}
docs: Selects the Date Pattern to use based on the given Locale if the input
  format is null
  
  @param locale
  Locale (may be the result of a call to selectLocale)
  @param momentJSFormat
  Input format String
  @return moment.js Date Pattern eg. DD/MM/YYYY