title: How do you get weekdays array for a selected locale using moment.js without changing its global localization?
body: <p>What I'm currently doing is:</p>
  
  <pre><code>moment.locale(locale)
  moment.weekdays(true)
  </code></pre>
  
  <p>But <code>moment.locale(locale)</code> changes the locale of the whole moment library and I only want to get a list of weekdays in a different locale without changing it.</p>
  
  <p>I tried using    </p>
  
  <pre><code>moment.localeData(locale).weekdays()
  </code></pre>
  
  <p>but you can't pass <code>true</code> to "weekdays" so the result doesn't sort items. For example:</p>
  
  <pre><code>moment.locale('en-us')
  moment.weekdays(true) // ["Sunday", "Monday", ...
  
  moment.locale('en-gb')
  moment.weekdays(true) // ["Monday", "Tuesday", ...
  </code></pre>
  
  <p>But</p>
  
  <pre><code>moment.localeData('en-us').weekdays() // ["Sunday", "Monday", ...
  
  moment.localeData('en-gb').weekdays() // ["Sunday", "Monday", ...
  </code></pre>
  
  <p>And there is no</p>
  
  <pre><code>moment.localeData('en-gb').weekdays(true)
  </code></pre>
  
  <p>Edit:
  Looks like they have an open issue about it, so please suggest your best hacks meanwhile:
  <a href="https://github.com/moment/moment/issues/4066" rel="nofollow noreferrer">https://github.com/moment/moment/issues/4066</a></p>