title: Exclude weekend dates from working days in JavaScript
body: <p>So I am kinda stuck in figuring out a certain aspect. What I want to do is the following:</p>
  
  <p>Let's say I just have a simple date display, which will show a date such as <code>October 10th, 2017</code> to an end user. And then there is an option to subtract a certain number of days from said date (<em>an offset of 1, 2, 3, whatever offset is chosen</em>).</p>
  
  <p>What I am looking to do is completely exclude weekend dates from the count - so if today is <code>Monday, October 9th</code>, and an <strong>offset of 1</strong> is selected, it goes to <code>Friday the 6th</code>; if an <strong>offset of 2</strong> is chosen, it goes to <code>Thursday the 5th</code>; an <strong>offset of 3</strong> goes to <code>Wednesday the 4th</code>... </p>
  
  <p>If today was <code>Wednesday, October 11th</code>, an <strong>offset of 2</strong> would take you to <code>Monday the 9th</code>, an <strong>offset of 4</strong> would go to <code>Thursday the 5th</code>, and so on (<em>completely disregards / skips weekend dates when counting / subtracting which day to land on</em>).</p>
  
  <p>I have so far been able to only find answers for the functionality to calculate the number of working days excluding weekends, and things of that nature (<em>which I already have, using the momentjs-business npm module, but is not exactly what I need</em>).</p>
  
  <p>I did not post code because this is part of a much larger code base, and I feel posting snippets would only add to the confusion, since I believe the question is relatively simply and straightforward; I do not want to over complicate.</p>
  
  <p>All I would like is to not include weekends at all when setting an offset from whichever date is displayed to the user (<em>the date which is displayed to the user is from a database</em>).</p>
  
  <p>I hope this all made sense, and if more info is needed, please let me know. Thanks in advance for anyone that can point me in the right direction!</p>