JavaScript Intl.DateTimeFormat.format vs Date.toLocaleString : <p>I would like to print a string representing a Date, using a specific timezone, locale, and display options.</p>

<p>Which one of these should I use?</p>

<ol>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/format" rel="noreferrer">Intl.DateTimeFormat.prototype.format</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString" rel="noreferrer">Date.prototype.toLocaleString()</a></li>
</ol>

<p>It seems like they return identical results.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const event = new Date(1521065710000);

const options = {
  day: 'numeric',
  month: 'long',
  weekday: 'short',
  hour: 'numeric',
  minute: 'numeric',
  timeZoneName: 'short',
  timeZone: 'America/Los_Angeles',
};

console.log(event.toLocaleString('en-US', options));
// "Wed, March 14, 3:15 PM PDT"

console.log(new Intl.DateTimeFormat('en-US', options).format(event));
// "Wed, March 14, 3:15 PM PDT"</code></pre>
</div>
</div>
</p>
