Adding Calendar Exceptions in PHP
Contents
[
Hide
Show
]Aspose.Tasks - Adding Calendar Exceptions
To add Calendar Exceptions using Aspose.Tasks Java for PHP, simply invoke AddCalendarException module. Here you can see example code.
1$project = new Project('test_tasks.mpp');
2$cal = $project->getCalendars()->toList()->get(0);
3$calException = new CalendarException();
4$calendar = new Calendar();
5$calObject = $calendar->getInstance();
6$calObject->set(2009, 1, 1, 0, 0, 0);
7$calException->setFromDate($calObject->getTime());
8$calObject->set(2009, 1, 3, 0, 0, 0);
9$calException->setToDate($calObject->getTime());
10$cal->getExceptions()->add($calException);
11print "Added calendar exception.";
You can download the working code example from GitHub.