DevTreks.Extensions/NPVCalculators/BIs/BICalculator.cs
/// <summary>
/// Adjust end of year date so that it always ends on the 31st
/// </summary>
/// <param name="date"></param>
/// <returns></returns>
Adjust end of year date so that it always ends on the 31st
Adjust end of year date so that it always ends on the 31st
private DateTime AdjustDateForLeapYear(DateTime date)
        {
            DateTime newDate = date;
            if (date.Day == 30)
            {
                newDate = date.AddDays(1.00);
            }
            else if (date.Day == 1)
            {
                newDate = date.AddDays(-1.00);
            }
            return newDate;
        }
private DateTime AdjustDateForLeapYear ( DateTime date ) { DateTime newDate = date ; if ( date . Day == 30 ) { newDate = date . AddDays ( 1.00 ) ; } else if ( date . Day == 1 ) { newDate = date . AddDays ( - 1.00 ) ; } return newDate ; }
Adjust end of year date so that it always ends on the 31st
Adjust end of year date so that it always ends on the 31st
None
date
DateTime
None