Defining Weekdays for Exceptions in PHP

Aspose.Tasks - Defining Weekdays for Exceptions

To Define Weekdays for Exceptions using Aspose.Tasks Java for PHP, simply invoke DefineWeekdaysForExceptions module. Here you can see example code.

 1$project = new Project('test_tasks.mpp');
 2$cal = $project->getCalendars()->add("Calendar1");
 3$except = new CalendarException();
 4$except->setEnteredByOccurrences(false);
 5$calendar = new Calendar();
 6$calendarExceptionType = new CalendarExceptionType();
 7$cal_object = $calendar->getInstance();
 8$cal_object->set(2009, 12, 24, 0, 0, 0);
 9$except->setFromDate($cal_object->getTime());
10$cal_object->set(2009, 12, 31, 23, 59, 0);
11$except->setToDate($cal_object->getTime());
12$except->setType($calendarExceptionType->Daily);
13$except->setDayWorking(false);
14$cal->getExceptions()->add($except);
15print "Defined weekdays for exceptions.";

Download Running Code

Download Defining Weekdays for Exceptions (Aspose.Tasks) from any of the below mentioned social coding sites:

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.