title: Split date range into date range chunks
body: <p>I am looking for a method of splitting a date range into a series of date ranges by chunk size of days.  I am planning on using this to buffer calls to a service which if the date range is too large, the service faults.  </p>
  
  <p>This is what I have come up with so far.  It seems to work, but I am not sure if it will exit properly.  This seems like something that has probably been done several times before, but I can't find it.</p>
  
  <pre><code>public IEnumerable&lt;Tuple&lt;DateTime, DateTime&gt;&gt; SplitDateRange(DateTime start, DateTime end, int dayChunkSize)
  {
      var newStart = start;
      var newEnd = start.AddDays(dayChunkSize);
  
      while (true)
      {
          yield return new Tuple&lt;DateTime, DateTime&gt;(newStart, newEnd);
  
          if (newEnd == end)
              yield break;
  
          newStart = newStart.AddDays(dayChunkSize);
          newEnd = (newEnd.AddDays(dayChunkSize) &gt; end ? end : newEnd.AddDays(dayChunkSize));
      }
  }
  </code></pre>
  
  <p>I'm looking for improvement suggestions, or "Dude, use this existing function for this!" </p>