title: Group by date range , count and sort within each group LINQ
body: <p>I have a collection of dates stored in my object. This is sample data. In real time, the dates will come from a service call and I will have no idea what dates and how many will be returned:</p>
  
  <pre><code>        var ListHeader = new List&lt;ListHeaderData&gt;
          {
              new ListHeaderData
              {
                  EntryDate = new DateTime(2013, 8, 26)
              },
              new ListHeaderData
              {
                  EntryDate = new DateTime(2013, 9, 11)
              },
              new ListHeaderData
              {
                  EntryDate = new DateTime(2013, 1, 1)
              },
              new ListHeaderData
              {
                  EntryDate = new DateTime(2013, 9, 15)
              },
              new ListHeaderData
              {
                  EntryDate = new DateTime(2013, 9, 17)
              },
              new ListHeaderData
              {
                  EntryDate = new DateTime(2013, 9, 5)
              },
          };
  </code></pre>
  
  <p>I now need to group by date range like so:</p>
  
  <pre><code>   Today (1) &lt;- contains the date 9/17/2013 and count of 1
     within 2 weeks (3) &lt;- contains dates 9/15,9/11,9/5 and count of 3
     More than 2 weeks (2) &lt;- contains dates 8/26, 1/1 and count of 2
  </code></pre>
  
  <p>this is my LINQ statement which doesnt achieve what I need but i think i'm in the ballpark (be kind if i'm not):</p>
  
  <pre><code>                   var defaultGroups = from l in ListHeader
                                      group l by l.EntryDate into g
                                      orderby g.Min(x =&gt; x.EntryDate)
                                      select new { GroupBy = g };
  </code></pre>
  
  <p>This groups by individual dates, so I have 6 groups with 1 date in each. How do I group by date range , count and sort within each group? Thanking in advance.</p>