title: Swap month with day in date string in Javascript
body: <p>I have a date string in format dd/MM/yyyy and I want to create a Date object from this string. <code>new Date(dd/MM/yyyy)</code> won't work..</p>
  
  <p>I have this code, that obviously does not work:</p>
  
  <pre><code>function createDateObject(value){
      try{
          return new Date(value.split('/').**swap(0, 1)**.join('/'));
      }
      catch(){
          return null;
      }
  }
  
  createDateObject('31/01/2014') =&gt; Fri Jan 31 2014 00:00:00 GMT-0200 (Local Daylight Time)
  </code></pre>
  
  <p>Which is the simplest way to do this?</p>
  
  <p>I wouldn't like to create a lot of temp variables if I could do it in one single line...</p>