Fiscal Year Properties in Ruby

Aspose.Tasks - Reading Fiscal Year Properties

To read Fiscal Year Properties using Aspose.Tasks Java for Ruby, call get_fiscal_year_properties method of FiscalYearProperties module. Here you can see example code.

Ruby Code

1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
2
3prj = Rjb::import('com.aspose.tasks.Prj')
4
5puts "Fiscal Year Start Date : " + project.get(prj.FY_START_DATE).toString()
6
7puts "Fiscal Year Numbering : " + project.get(prj.FISCAL_YEAR_START).toString()

Aspose.Tasks - Writing Fiscal Year Properties

To write Fiscal Year Properties using Aspose.Tasks Java for Ruby, call set_fiscal_year_properties method of FiscalYearProperties module. Here you can see example code.

Ruby Code

 1project = Rjb::import('com.aspose.tasks.Project').new
 2
 3prj = Rjb::import('com.aspose.tasks.Prj')
 4
 5project.set(prj.FY_START_DATE, Rjb::import('com.aspose.tasks.Month').July)
 6
 7project.set(prj.FISCAL_YEAR_START, Rjb::import('com.aspose.tasks.NullableBool').new(true))
 8
 9project.save("fiscal_year_properties.xml", Rjb::import('com.aspose.tasks.SaveFileFormat').XML)
10
11puts "Set fiscal year properties, please check the output file."

Download Running Code

Download Fiscal Year Properties (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.