Managing Task Durations in PHP
Contents
[
Hide
Show
]Aspose.Tasks - Managing Durations
To manage durations using Aspose.Tasks Java for Ruby, simply invoke ManagingDuration module. Here you can see example code.
1project = Rjb::import('com.aspose.tasks.Project').new
2task = project.getRootTask().getChildren().add("Task")
3tsk = Rjb::import('com.aspose.tasks.Tsk')
4duration = task.get(tsk.DURATION)
5puts "Duration in Days: " + duration.toString()
6duration = duration.convert(Rjb::import('com.aspose.tasks.TimeUnitType').Hour)
7puts "Duration in Hours: "+ duration.toString()
8task.set(tsk.DURATION, task.get(tsk.DURATION).subtract(0.5))
9puts "0.5 weeks: " + task.get(tsk.DURATION).toString()
Download Running Code
Download Managing Durations (Aspose.Tasks) from any of the below mentioned social coding sites: