Examples of addWorkingDays()


Examples of org.projectforge.calendar.DayHolder.addWorkingDays()

    final DayHolder day = new DayHolder();
    day.setDate(2010, Calendar.FEBRUARY, 5);
    activity1.setStartDate(day.getDate());
    assertDates("2010-02-05", "2010-02-19", activity1);
    activity1.setStartDate(null);
    day.addWorkingDays(10);
    activity1.setEndDate(day.getDate());
    assertDates("2010-02-05", "2010-02-19", activity1);

    final GanttTaskImpl activity2 = createActivity(5).setTitle("activity2");
    activity2.setPredecessor(activity1);
View Full Code Here

Examples of org.projectforge.calendar.DayHolder.addWorkingDays()

    final DayHolder day = new DayHolder();
    day.setDate(2010, Calendar.JUNE, 1);
    a1.setStartDate(day.getDate());
    assertTrue("a1.startDate before a2.startDate = null (now).", GanttUtils.GANTT_OBJECT_COMPARATOR.compare(a1, a2) < 0);
    assertTrue("a1.startDate before a2.startDate = null (now).", GanttUtils.GANTT_OBJECT_COMPARATOR.compare(a2, a1) > 0);
    day.addWorkingDays(2);
    a2.setStartDate(day.getDate());
    assertTrue("a1.startDate before a2.startDate.", GanttUtils.GANTT_OBJECT_COMPARATOR.compare(a1, a2) < 0);
    assertTrue("a1.startDate before a2.startDate.", GanttUtils.GANTT_OBJECT_COMPARATOR.compare(a2, a1) > 0);
    a1.setStartDate(day.getDate());
    assertTrue("Same start date -> alphabetical order", GanttUtils.GANTT_OBJECT_COMPARATOR.compare(a1, a2) > 0);
View Full Code Here

Examples of org.projectforge.calendar.DayHolder.addWorkingDays()

    assertTrue("a1.startDate before a2.startDate.", GanttUtils.GANTT_OBJECT_COMPARATOR.compare(a1, a2) < 0);
    assertTrue("a1.startDate before a2.startDate.", GanttUtils.GANTT_OBJECT_COMPARATOR.compare(a2, a1) > 0);
    a1.setStartDate(day.getDate());
    assertTrue("Same start date -> alphabetical order", GanttUtils.GANTT_OBJECT_COMPARATOR.compare(a1, a2) > 0);
    assertTrue("Same start date -> alphabetical order", GanttUtils.GANTT_OBJECT_COMPARATOR.compare(a2, a1) < 0);
    day.addWorkingDays(2);
    a2.setEndDate(day.getDate());
    final Date a1StartDate = a1.getStartDate();
    a1.setStartDate(null);
    assertTrue("a1.endDate = null after a2.endDate", GanttUtils.GANTT_OBJECT_COMPARATOR.compare(a1, a2) > 0);
    assertTrue("a1.endDate = null before a2.endDate", GanttUtils.GANTT_OBJECT_COMPARATOR.compare(a2, a1) < 0);
View Full Code Here

Examples of org.projectforge.common.DateHolder.addWorkingDays()

  }

  private static Date calculateDate(final Date date, final int workingDayOffset)
  {
    final DateHolder dh = new DateHolder(date);
    dh.addWorkingDays(workingDayOffset);
    return dh.getDate();
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.