2
Vote

Add Days

description

You can see the calculation only gets executed if the Days Added is not equal to 0:


__if (start != DateTime.MinValue && DaysToAdd.Get<int>(executionContext) != 0)
        {
            result = start.AddYears(YearsToAdd.Get<int>(executionContext))
                          .AddMonths(MonthsToAdd.Get<int>(executionContext))
                          .AddDays((7*WeeksToAdd.Get<int>(executionContext)) + 
                                   DaysToAdd.Get<int>(executionContext))
                          .AddHours(HoursToAdd.Get<int>(executionContext))
                          .AddMinutes(MinutesToAdd.Get<int>(executionContext));
        }

        Result.Set(executionContext, result); 
__

Nothing gets executed if you just want to add x number of hours.

comments

anothersphere wrote Dec 6, 2013 at 2:05 AM

Yup, this is exactly what I am seeing.
I want to add a calendar month, for a contract occurrence and I cant use this tool to do it.
I could of course (?) add a day subtract a day, but that is awfully silly.