code: public static synchronized FastDateFormat getDateInstance(int style, TimeZone timeZone, Locale locale) {
          Object key = new Integer(style);
          if (timeZone != null) {
              key = new Pair(key, timeZone);
          }
  
          if (locale == null) {
              locale = Locale.getDefault();
          }
  
          key = new Pair(key, locale);
  
          FastDateFormat format = (FastDateFormat) cDateInstanceCache.get(key);
          if (format == null) {
              try {
                  SimpleDateFormat formatter = (SimpleDateFormat) DateFormat.getDateInstance(style, locale);
                  String pattern = formatter.toPattern();
                  format = getInstance(pattern, timeZone, locale);
                  cDateInstanceCache.put(key, format);
                  
              } catch (ClassCastException ex) {
                  throw new IllegalArgumentException("No date pattern for locale: " + locale);
              }
          }
          return format;
      }
docs: <p>Gets a date formatter instance using the specified style, time
  zone and locale.</p>
  
  @param style  date style: FULL, LONG, MEDIUM, or SHORT
  @param timeZone  optional time zone, overrides time zone of
  formatted date
  @param locale  optional locale, overrides system locale
  @return a localized standard date formatter
  @throws IllegalArgumentException if the Locale has no date
  pattern defined