Defining Weekdays for Exceptions in PHP
Contents
[
Hide
Show
]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
3$cal = $project->getCalendars()->add("Calendar1");
4
5$except = new CalendarException();
6
7$except->setEnteredByOccurrences(false);
8
9$calendar = new Calendar();
10
11$calendarExceptionType = new CalendarExceptionType();
12
13$cal_object = $calendar->getInstance();
14
15$cal_object->set(2009, 12, 24, 0, 0, 0);
16
17$except->setFromDate($cal_object->getTime());
18
19$cal_object->set(2009, 12, 31, 23, 59, 0);
20
21$except->setToDate($cal_object->getTime());
22
23$except->setType($calendarExceptionType->Daily);
24
25$except->setDayWorking(false);
26
27$cal->getExceptions()->add($except);
28
29print "Defined weekdays for exceptions.";
Download Running Code
Download Defining Weekdays for Exceptions (Aspose.Tasks) from any of the below mentioned social coding sites: