Ejemplo n.º 1
0
 public WorkdayCalculatorResult(int numberOfWorkdays, System.DateTime startDate, System.DateTime endDate, WorkdayCalculationDirection direction)
 {
     NumberOfWorkdays = numberOfWorkdays;
     StartDate        = startDate;
     EndDate          = endDate;
     Direction        = direction;
 }
 public WorkdayCalculatorResult(int numberOfWorkdays, System.DateTime startDate, System.DateTime endDate, WorkdayCalculationDirection direction)
 {
     NumberOfWorkdays = numberOfWorkdays;
     StartDate = startDate;
     EndDate = endDate;
     Direction = direction;
 }
Ejemplo n.º 3
0
        public System.DateTime GetNextWorkday(System.DateTime date, WorkdayCalculationDirection direction = WorkdayCalculationDirection.Forward)
        {
            var changeParam = (int)direction;
            var tmpDate     = date.AddDays(changeParam);

            while (IsHolidayWeekday(tmpDate))
            {
                tmpDate = tmpDate.AddDays(changeParam);
            }
            return(tmpDate);
        }