title: Extract the date format from react-intl
body: <p>I have a component that uses a datepicker. The datepicker needs a dateFormat property that fits the momentjs pattern, for example <code>'DD.MM.YYYY'</code> or <code>'MM/DD/YYYY'</code>.</p>
  
  <p>The date formatting is handled by <code>react-intl</code>. This works fine when converting from a date to a string (via formatDate). However, I need to retrieve the pattern as described above.</p>
  
  <p>My goal is to do something like </p>
  
  <pre><code>dateFormat = this.props.intl.extractDateFormat() // returns 'DD.MM.YYYY'
  </code></pre>
  
  <p>I have found <a href="https://stackoverflow.com/questions/29255843/is-there-a-way-to-reverse-the-formatting-by-intl-numberformat-in-javascript">this similar question</a>, but the only answer relies on parsing the string, which I cannot do, because I do not know whether Day or Month will come first in the formatted date.</p>
  
  <p>If it is possible to convert this string to a date and somehow retrieve the format from <code>momentjs</code>, that would also be a good solution.</p>