title: Moment.js sets dates to 1 day behind
body: <p>I am using 2.22.1 to format dates.</p>
  
  <p>When i put in a date that comes from a date selector, moment will put the date back one day. For example, when I try to format a date in the following way:</p>
  
  <p><strong>Example 1:</strong></p>
  
  <pre><code>const day = new Date(value).getDate();
  const month = new Date(value).getMonth();
  const fullYear = new Date(value).getFullYear();
  console.log('day', day); // 7
  console.log('month', month); // 5
  console.log('fullYear', fullYear); //2018
  </code></pre>
  
  <p>Formatting function:</p>
  
  <pre><code>moment.utc(new Date(month + ' ' + day + ' ' + fullYear), 'MM-DD-YYYY').format('DD-MM-YY')
  </code></pre>
  
  <p>Output: 06-05-18 </p>
  
  <p>Expected: 07-05-18</p>
  
  <p><strong>Example 2:</strong></p>
  
  <p>Input: Thu May 31 2018 00:00:00 GMT+0100 (GMT Summer Time)</p>
  
  <p>Formatting function:</p>
  
  <pre><code>moment.utc(new Date(value)).format('DD-MM-YY')
  </code></pre>
  
  <p>Output: 30-05-18
  Expected: 31-05-18</p>