title: Simplest way to calculate anniversary given a date in the past?
body: <p>i need a function that calculates if there is an upcoming anniversary for a person given a start date in the past and today's current date.  I found this code below but looking at the below code and I have the feeling that there is a much simpler way to calculate this without required this for loop:</p>
  
  <pre><code>private const int ANNIVERSARY_ALERT = 10;
  
  public virtual string UpcomingMilestone
  {
      get
      {
          var years = Years() + 2;
          for (int year = 0; year &lt; years; year++)
          {
              int days = year * 365;
              int dayDiff = days - NumberOfDays;
              if (dayDiff == 0)
              {
                  return year + " year milestone";
              }
              if (dayDiff &lt; ANNIVERSARY_ALERT &amp;&amp; dayDiff &gt; 0)
              {
                  return year + " year milestone in " + dayDiff + " days";
              }
          }
          return string.Empty;
      }
  }
  
  public virtual int NumberOfDays
  {
      get
      {
          TimeSpan ts = DateTime.Today - StartDate.Value;
          return (int)ts.TotalDays;
      }
  }
  
  public virtual int Years()
  {
      TimeSpan span = DateTime.Now.Subtract(StartDate.Value);
      return (int)(span.Days / 365.25); // leap years included
  }
  </code></pre>
  
  <p>Can anyone suggest a way to calculate this above without having to do this loop?  This is more for code maintainability versus any performance considerations.</p>