title: given a start date how to find the end date which have 365 or 366 days based on the leap year
body: <pre><code>public static DateTime GetBudgetYearEndDateConsideringLeapYear(DateTime budgetYearStartDate)
      {
          DateTime endDate = DateTime.MinValue;
          if (budgetYearStartDate == null)
              throw new ArgumentNullException("budgetYearStartDate must be provided before calling this method");
  
          int startingDateMonth = budgetYearStartDate.Month;
          if (startingDateMonth &gt; 2) /// Leap year for the starting year is escaped because  Month is NOT February
          {
              endDate = budgetYearStartDate.AddDays(365);
              bool isEndYearLeapYear = DateTime.IsLeapYear(endDate.Year);
  
              if (isEndYearLeapYear)
              {
                  return endDate.AddDays(1);
              }
              return endDate;
          }
          else  // started from JAN/ FEB
          {
              if (DateTime.IsLeapYear(budgetYearStartDate.Year))
              {
                  return budgetYearStartDate.AddDays(366);
              }
              return budgetYearStartDate.AddDays(365);
          }
  
      }
  </code></pre>
  
  <p>What am I missing here</p>