Berechnen Sie die Aufgabendauer in verschiedenen Einheiten in Ruby
Contents
[
Hide
Show
]Aspose.Tasks - Berechnen Sie die Aufgabendauer in verschiedenen Einheiten
So berechnen Sie die Aufgabendauer in verschiedenen Einheiten mit ** asspose. Hier sehen Sie Beispielcode.
Rubincode
1project = rjb :: import ('com.aspsient.tasks.project'). new ('test_tasks.mpp')
2
3tsk = rjb :: import ('com.aspsient.tasks.tsk'))
4
5TIME_UNIT_TYPE = RJB :: Import ('com.aspsis.tasks.TimeUnITType')
6
7task = project.getroottask (). getCildren (). getbyid (1)
8
9Puts task.get (tsk.duration) .convert (time_unit_type.minute) .todouble ()
10
11puts task.get (tsk.duration) .convert (time_unit_type.day) .todouble ()
12
13Puts task.get (tsk.duration) .convert (time_unit_type.hour) .todouble ()
14
15Puts task.get (tsk.duration) .convert (time_unit_type.week) .todouble ()
16
17Puts task.get (tsk.duration) .convert (time_unit_type.month) .todouble ()
Download Running Code
Download Berechnen Sie die Aufgabendauer in verschiedenen Einheiten (assposes.tasks) Aus einem der folgenden erwähnten Social -Coding -Websites: