Skip to main content

TdxGanttControlRecurrencePattern.DayOfMonth Property

Specifies a day of the month to repeat a task.

Declaration

property DayOfMonth: Word read; write;

Property Value

Type
Word

Remarks

Use this property to schedule a recurring task on a day of the month. The task occurs once per a specified number of months. You can input an integer in the range from 1 to 31.

This property has an effect if the Type property value is AbsoluteMonthly or AbsoluteYearly.

The control reschedules a task if any of the following conditions are met:

  • A task occurrence falls on a day whose number exceeds the maximum number of days in the month (for instance, you schedule a recurring task for the 31st day of each month). In this case, the task is rescheduled for the last day of the current month.

  • A task occurs on a non-working day. In this case, the task moves forward to the closest workday.

The table below shows a recurring task scheduled for the 31st day of each month during a six month period for a leap year (2016) and a non-leap year (2021):

2016

2021

Comment

02/01

02/01

January 31st was a Sunday in both 2016 and 2021, so the task was rescheduled to Monday (February 1st).

02/29

03/01

In 2016, the task was planned for February 29th since this was the last workday in this month.

In 2021, February 28th was a Sunday, so the task occurred on the first workday in March.

03/31

03/31

The task occurred on March 31st since this day was a workday in both years.

05/02

04/30

In 2016, this day was scheduled for May 2nd since April consists of 30 days and April 30th was a Sunday, so the task occurred on the first workday in May.

In 2021, the task was planned for April 30th since this was the last workday in this month.

05/31

05/31

The task occurred on May 31st since this day was a workday in both years.

06/30

06/30

The task occurred on June 30th since this day was a workday in both years.

Change Task Occurrence Settings at Runtime

A user can right-click any row in the Task View‘s sheet and select “Insert Recurring Task…” in the context menu to invoke the “Recurring Task Information“ dialog.

Insert Task Menu Item

In this dialog, select the “Monthly” or “Yearly” task occurrence frequency in the “Recurrence Pattern” pane and specify the day of the month (a number between 1 and 31) to repeat a task.

A day of the month in the monthly and yearly recurrence patterns

See Also