title: Get previous work day
body: <p>I need to get previous work day:</p>
  
  <pre><code>public DateTime GetPreviousWorkDay(DateTime date)
  {
      DateTime prevDay = date.AddDays(-1);
      bool isHoliday = IsHoliday(prevDay);
      while (isHoliday || prevDay.DayOfWeek == DayOfWeek.Saturday || prevDay.DayOfWeek == DayOfWeek.Sunday)
      {
          prevDay = prevDay.AddDays(-1);
          isHoliday = IsHoliday(prevDay);
      }
      return prevDay;
  }
  </code></pre>
  
  <p>Is this method safe? Can it be an infinite cycle? Is there an simpler way?</p>