title: How do I get the closest DateTime from a List<DateTime>
body: <p>Say I have the most recent DateTime and a List of all the possible dates. How would I efficiently go about finding the closest date time to last year's date in the list?</p>
  
  <p>Say my list is comprised of the following:</p>
  
  <pre><code>2014-03-07
  2014-03-14
  2014-03-21
  2014-03-28
  ...
  2015-03-06
  2015-03-13
  2015-03-20
  </code></pre>
  
  <p>My most recent date is <i>2015-03-20</i>, but I want to retrieve last year's date, <i>2014-03-21</i>.</p>
  
  <p>This is what I have currently, but it won't work if last year's date is one day off (eg; my time periods are stored weekly).</p>
  
  <pre><code>public DateTime LastYearDate()
  {
      List&lt;DateTime&gt; times = GetAllDates();
      times.Sort();
      times.Reverse();
      DateTime currentDate = times.First();
      return times.Where(dt =&gt; dt == currentDate.AddYears(-1)).First();
  }
  </code></pre>
  
  <p>I'm not sure what I would use to recursively calculate the closest date, so if you have any ideas of what direction I should take (reference to any Linq functions to check out), that would be appreciated.</p>