title: javascript date format (international settings)
body: <p>The javascript Date.toLocaleDateString() is silly.</p>
  
  <p>What I need is a function that allows me to simplify the date according to preference.</p>
  
  <p>It would be nice if there were a function which would read the browser date formats (plural) and take an optional parameter telling it which format to use.</p>
  
  <p>I'll explain:
  "MM/DD/YYYY" works great for the US and anyone willing to put up with them/us.
  "DD/MM/YYYY" is the most common format for people interested in a short simple date format.
  "Weekday, Month DayOfMonth, Year" is only useful if you want a super-long and language-dependent output.</p>
  
  <p>I could use this:</p>
  
  <pre><code>var s = "/";
  if(locale=='us')
    var dateString = Date.getDate()+s+Date.getDay()+s+Date.getFullYear();
  else
    var dateString = Date.getDay()+s+Date.getDate()+s+Date.getFullYear();
  </code></pre>
  
  <p>But I'm looking for a more elegant solution that will allow me to store a date mask or format string so people can change the way their dates are displayed according to their own tastes. (Even the super-long language-dependent one if they like it enough.)</p>
  
  <p>Should I re-prototype the Date.toString() method to interpret parameters?  Is there a better way?</p>