Calendar Properties

Fiscal Year Properties

The fiscal year is the same as a financial year or budget year. It is the dates between which a country, an organization or an individual calculate budgets and taxes. Microsoft Project lets users define a fiscal year for projects. Aspose.Tasks for C++ supports this functionality with properties that allow developers to both read fiscal year properties from existing projects, and set fiscal year properties when creating or working with projects.

The Prj class exposes the FyStartDate and FiscalYearStart properties used to manage fiscal year for a project:

  • FyStartDate: define the fiscal year start month and supports one of the values defined by the Month enumeration.
  • FiscalYearStart: determines whether the fiscal year numbering has been used in the project. Boolean.

Reading Fiscal Year Properties

The FyStartDate and FiscalYearStart properties make it easy to find out what the current fiscal year start date is, and whether fiscal year numbering is used, with Aspose.Tasks.

The code example given below demonstrates how to read a project’s fiscal year properties and displays them in a console window.

Writing Fiscal Year Properties

To see fiscal year properties in Microsoft Project:

  1. Open a project file.
  2. On the Tools menu, click Options.
  3. Click the Calendar tab. It will look like the one shown below.

Checking that the fiscal year properties have been set in Microsoft Project.

fiscal year properties in Microsoft Project

The code example given below demonstrates how to write the fiscal year properties of the project.

Weekday Properties

Microsoft Project lets users set a number of different weekday properties. For example, what day a week starts on and how many working days are in a month. Aspose.Tasks for C++ support these features through a number of properties that can be used both to read weekday properties and to write them to a project.

Aspose.Tasks for C++ has a series of properties, exposed by the Prj class, specifically for managing a project’s weekday properties:

  • WeekStartDay: the first day of the week. This property takes values defined by the DayType enumeration.
  • DaysPerMonth: the number of working days in a month, passed as an integer.
  • MinutesPerDay: the number of working minutes in a working day, passed as an integer.
  • MinutesPerWeek: the number of working minutes in a working week, passed as an integer.

Reading Weekday Properties

The code example given below demonstrates how to read a project’s weekday properties and writes them to a console window.

Writing Weekday Properties

To see weekday properties in Microsoft Project:

  1. Open a file.
  2. On the Tools menu, click Options.
  3. Select the Calendar tab. It will look something like the example below.

Viewing weekday properties in Microsoft Project

show project calendar properties in Microsoft Project

The code example given below demonstrates how to write weekday properties, as shown in the screenshot above, to a project.