title: moment.js - subtract 1 day from Sunday not working as expected
body: <p>I have a moment object that I want to subtract 1 day from. The original date shows as <code>Sun Jul 15 2018 12:00:00</code> and I want to subtract 1 day from it so that it outputs as <code>Sat Jul 14 2018 12:00:00</code>. </p>
  
  <p>This seems like it should be really easy if I use the <code>subtract()</code> function, but it's changing the date to the upcoming Saturday, not the Saturday before July 15. I'm assuming this has something to do with the week starting on July 15. </p>
  
  <p>This seems to only be an issue when I'm using Sunday as my starting date. How can I make this work the way I need it to?</p>
  
  <p>Here is my JS:</p>
  
  <pre><code>var timeFormat = 'dddd h:mma';
  var originalDate = moment("sunday 12:00:00pm", timeFormat);
  var previousDay = moment(originalDate).subtract(1, 'days').format(timeFormat);
  var newDate = moment(previousDay+"12:00:00pm", timeFormat);
  
  $(".openTime span").text(originalDate);
  $(".newOpenTime span").text(newDate);
  </code></pre>
  
  <p>This outputs <code>Sun Jul 15 2018 12:00:00</code> as the <code>originalDate</code> and <code>Sat Jul 21 2018 12:00:00</code> as the date subtracted by 1 day. As you can see the new date is now <code>Sat Jul 21</code> for some reason. </p>
  
  <p>Here's a JSFiddle link: <a href="https://jsfiddle.net/dmcgrew/b5ev8knd/22/" rel="nofollow noreferrer">https://jsfiddle.net/dmcgrew/b5ev8knd/22/</a></p>