タスク期間を計算します
Contents
[
Hide
Show
]Aspose.Tasks -異なる単位でタスク期間を計算
Aspose.Tasks asops.tasks java for phpを使用して異なるユニットでタスク期間を計算するには、calculateTaskDurationモジュールを呼び出します。ここでは、サンプルコードを見ることができます。
PHPコード
1$ project = new Project( 'test_tasks.mpp');
2
3$ tsk = new tsk();
4
5$ time_unit_type = new TimeUnittype();
6
7$ task = $ project-> getroottask() - > getChildren() - > getByid(1);
8
9print(double)(string)($ task-> get($ tsk-> duration) - > convert($ time_unit_type-> minute))。 "\ n";
10
11print(double)(string)($ task-> get($ tsk-> duration) - > convert($ time_unit_type-> day))。 "\ n";
12
13print(double)(string)($ task-> get($ tsk-> duration) - > convert($ time_unit_type-> hour))。 "\ n";
14
15print(double)(string)($ task-> get($ tsk-> duration) - > convert($ time_unit_type-> week))。 "\ n";
16
17print(double)(string)($ task-> get($ tsk-> duration) - > convert($ time_unit_type-> month))。 "\ n";
実行中のコードをダウンロード
ダウンロード**以下のソーシャルコーディングサイトのいずれかから、さまざまなユニット(Aspose.Tasks)でタスクの期間を計算します。