title: What would be the best way to determine the first and last business days of a given month
body: <p>What would be the best way to determine the first and last business days of a given month along with a given set of yearly public holidays? </p>
  
  <p>Assuming</p>
  
  <ul>
  <li>a Business Day is one that is not among Saturdays, Sundays or given public holidays</li>
  <li>a Business Month starts with, and ends at a Business Day as defined above.</li>
  </ul>
  
  <p>Here is a piece of code to precisely illustrate my question: </p>
  
  <pre><code>struct BusinessMonthRange
  {
      public DateTime startDate;
      public DateTime endDate;
  } 
  
  BusinessMonthRange GetBusinessMonthDateRange(int month, int year, List&lt;DateTime&gt; yearsPublicHolidays)
  {
      //Calculate
      return BusinessMonthRange;
  }
  </code></pre>
  
  <p><strong>Edit:</strong>
  For increased clarity, I've put the assumptions in the question as pointed out by Lasse V. Karlsen and GraemeMiller in their answers</p>