Weekday Properties in Ruby
Contents
[
Hide
Show
]Aspose.Tasks - Reading Weekday Properties
To read weekday properties using Aspose.Tasks Java for Ruby, call get_weekday_properties method of WeekdayProperties module. Here you can see example code.
1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
2prj = Rjb::import('com.aspose.tasks.Prj')
3puts "Week Start Date : " + project.get(prj.WEEK_START_DAY).toString()
4puts "Days Per Month : " + project.get(prj.DAYS_PER_MONTH).toString()
5puts "Minutes Per Day : " + project.get(prj.MINUTES_PER_DAY).toString()
6puts "Minutes Per Week : " + project.get(prj.MINUTES_PER_WEEK).toString()
Aspose.Tasks - Writing Weekday Properties
To write weekday properties using Aspose.Tasks Java for Ruby, call set_weekday_properties method of WeekdayProperties module. Here you can see example code.
1project = Rjb::import('com.aspose.tasks.Project').new
2prj = Rjb::import('com.aspose.tasks.Prj')
3project.set(prj.WEEK_START_DAY, Rjb::import('com.aspose.tasks.DayType').Monday)
4project.set(prj.DAYS_PER_MONTH, 24)
5project.set(prj.MINUTES_PER_DAY, 540)
6project.set(prj.MINUTES_PER_WEEK, 3240)
7project.save("weekday_properties.xml", Rjb::import('com.aspose.tasks.SaveFileFormat').XML)
8puts "Set weekday properties, please check the output file."
Download Running Code
Download Weekday Properties (Aspose.Tasks) from any of the below mentioned social coding sites: