Editing Task Baseline Durations in PHP

Aspose.Tasks - Task Baseline Duration

To get Task Baseline Duration using Aspose.Tasks Java for PHP, simply invoke TaskBaselineDuration module. Here you can see example code.

PHP Code

 1$oneSecond = 10000000;
 2$oneMinute = 60 * $oneSecond;
 3$oneHour = 60 * $oneMinute;
 4$project = new Project();
 5$task = $project->getRootTask()->getChildren()->add("Task");
 6$baselineType = new BaselineType();
 7$project->setBaseline($baselineType->Baseline);
 8$baseline = $task->getBaselines()->toList()->get(0);
 9$duration = (double)(string)($baseline->getDuration());
10$baseline_duration = $duration / $oneHour;
11print $baseline_duration;

Download Running Code

Download Task Baseline Duration (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.