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
183386
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;
		}
	}
933396
public static FastDateFormat getTimeInstance(final int style, final TimeZone timeZone, final Locale locale) {
		return cache.getTimeInstance(style, timeZone, locale);
	}
542806
public CalendarFormatter getCalendarFormatter(CLDR.Locale locale) {
    locale = bundleMatch(locale);
    CalendarFormatter formatter = CALENDAR_FORMATTERS.get(locale);
    return formatter == null ? CALENDAR_FORMATTERS.get(CLDR.Locale.en_US) : formatter;
  }
1329890
function createDateTimeParser( formatKey, fallbackFormatsKey, isoFormat ) {
   return ( options, str ) => {
      const val = `${str}`.trim();

      if( val.length === 0 ) {
         return success( null );
      }

      let formats = [ options[ formatKey ] ];
      if( options[ fallbackFormatsKey ] && options[ fallbackFormatsKey ].length ) {
         formats = options[ fallbackFormatsKey ].concat( formats );
      }

      const mDate = momentParse( str, formats, options );
      return mDate.isValid() ? success( mDate.format( isoFormat ) ) : error();
   };
}
1313596
public static String format(Locale locale, TimeZone timeZone, String pattern, Date date) {
	synchronized (data) {
	    String key = locale.toString() + '-' + timeZone.getID() + '-' + pattern;
	    Object obj = data.get(key);
	    if (obj != null) {
		return ((SimpleDateFormat) obj).format(date);
	    }
	    SimpleDateFormat sdf = new SimpleDateFormat(pattern, locale);
	    sdf.setTimeZone(timeZone);
	    data.put(key, sdf);
	    return sdf.format(date);
	}
    }
225888
public CellFormatResult format(final String formatPattern, final Date value, final Locale locale) {
        return format(new DateCell(value, formatPattern), locale);
    }
940561
public PrettyTime setLocale(Locale locale)
   {
      if (locale == null)
         locale = Locale.getDefault();

      this.locale = locale;
      for (TimeUnit unit : units.keySet()) {
         if (unit instanceof LocaleAware)
            ((LocaleAware<?>) unit).setLocale(locale);
      }
      for (TimeFormat format : units.values()) {
         if (format instanceof LocaleAware)
            ((LocaleAware<?>) format).setLocale(locale);
      }
      return this;
   }
1176081
public DateFormat getDateTimeFormat(int dateStyle, int timeStyle, Locale loc) {
        return formatHelper(this, ULocale.forLocale(loc), dateStyle, timeStyle);
    }
593211
@Override
  public DurationFormatterFactory setLocale(String localeName) {
    if (!localeName.equals(this.localeName)) {
      this.localeName = localeName;
      if (builder != null) {
          builder = builder.withLocale(localeName);
      }
      if (formatter != null) {
          formatter = formatter.withLocale(localeName);
      }
      reset();
    }
    return this;
  }
536198
private static SimpleDateFormat createDateFormat(String pattern, EUniCalendar calendar) {
		return createDateFormat(pattern, calendar, getDefault());
	}
891586
public String formatAsString(final String formatPattern, final String value, final Locale locale) {
        return format(formatPattern, value, locale).getText();
    }
1157608
public static FastDateFormat getDateInstance(final int style, final TimeZone timeZone, final Locale locale) {
		return cache.getDateInstance(style, timeZone, locale);
	}
578047
public synchronized static String formatDate(final java.util.Date object, String pattern) {
		if (pattern == null || pattern.equals("")) {
			pattern = JKFormatUtil.DEFAULT_DATE_PATTERN;
		}
		return JKFormatUtil.getDateFormatter(pattern).format(object);
	}
194745
@SuppressWarnings("resource")
	protected static final String format(final double toFormat) {
		return new Formatter(Locale.US).format(FLOATFORMAT, toFormat)
				.toString();
	}
368974
public Calendar toCalendar(TimeZone zone, Locale locale) {
		if (null == locale) {
			locale = Locale.getDefault(Locale.Category.FORMAT);
		}
		final Calendar cal = (null != zone) ? Calendar.getInstance(zone, locale) : Calendar.getInstance(locale);
		cal.setFirstDayOfWeek(firstDayOfWeek.getValue());
		cal.setTime(this);
		return cal;
	}
408249
private static Date extractDate(String text, Locale locale) {
		DateFormat fmt;
		for (int style = 0; style <= 3; ++style) {
			// Date and time parsing
			for (int style2 = 0; style2 <= 3; ++style2) {
				fmt = DateFormat.getDateTimeInstance(style, style2, locale);
				try {
					return fmt.parse(text);
				} catch (ParseException exception) {
					//
				}
			}
			// Date only parsing
			fmt = DateFormat.getDateInstance(style, locale);
			try {
				return fmt.parse(text);
			} catch (ParseException exception) {
				//
			}
			// Time only parsing
			fmt = DateFormat.getTimeInstance(style, locale);
			try {
				return fmt.parse(text);
			} catch (ParseException exception) {
				//
			}
		}
		return null;
	}
876415
function getLocaleDayNames(locale, formStyle, width) {
    var /** @type {?} */ data = findLocaleData(locale);
    var /** @type {?} */ daysData = /** @type {?} */ ([data[3 /* DaysFormat */], data[4 /* DaysStandalone */]]);
    var /** @type {?} */ days = getLastDefinedValue(daysData, formStyle);
    return getLastDefinedValue(days, width);
}