title: How do I get localized date pattern string?
body: <p>It is quite easy to format and parse Java Date (or Calendar) classes using instances of <a href="https://docs.oracle.com/javase/1.5.0/docs/api/java/text/DateFormat.html" rel="nofollow noreferrer">DateFormat</a>.</p>
  <p>I could format the current date into a short localized date like this:</p>
  <pre><code>DateFormat formatter = DateFormat.getDateInstance(DateFormat.SHORT, Locale.getDefault());
  String today = formatter.format(new Date());
  </code></pre>
  <p>My problem is that I need to obtain this localized pattern string (something like <code>&quot;MM/dd/yy&quot;</code>).</p>
  <p>This should be a trivial task, but I just couldn't find the provider.</p>