title: Get ISO 8601 using Intl.DateTimeFormat
body: <p>I want to use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat" rel="noreferrer"><code>Intl.DateTimeFormat</code></a> to format a <em>Date</em>, and in the examples it says</p>
  
  <pre><code>// when requesting a language that may not be supported, such as
  // Balinese, include a fallback language, in this case Indonesian
  </code></pre>
  
  <p>Great, so I want my fallback to be <em>ISO 8601</em> in the case a language doesn't exist</p>
  
  <pre><code>// i.e. the same as/similar to
  new Date().toISOString(); // "2014-07-31T02:42:06.702Z"
  </code></pre>
  
  <p>however</p>
  
  <pre><code>//  Intl.DateTimeFormat([locales [, options]])
  var o = {};
  o.year = o.month = o.day = o.hour = o.minute = o.second = 'numeric';
  new Intl.DateTimeFormat(['foo', 'iso8601'], o);
  // RangeError: Invalid language tag: iso8601
  </code></pre>
  
  <p>This seems to be because <code>iso8601</code> isn't part of</p>
  
  <blockquote>
    <p><code>locales</code> A string with a <em>BCP 47</em> language tag, or an array of such strings.</p>
  </blockquote>
  
  <p>I've also tried using one I know works, e.g. <code>en-GB</code> with a <code>u-ca-iso8601</code> suffix but this doesn't produce any different result to without the suffix</p>
  
  <pre><code>var f = new Intl.DateTimeFormat(['foo', 'en-GB-u-ca-iso8601'], o);
  f.format(new Date());
  // 31/7/2014 03:35:26
  </code></pre>
  
  <p>Why isn't this working? Is there even a <code>locale</code> which will give me the output I'm looking for?</p>
  
  <hr>
  
  <p>I'd rather not have to write some complicated wrapper using e.g.</p>
  
  <pre><code>if (Intl.DateTimeFormat.supportedLocalesOf(['foo']).length === 0)
  </code></pre>