Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

ProjectRecurrenceRule

OfficeIMO.Project

Namespace
OfficeIMO.Project
Assembly
OfficeIMO.Project
Source revision
ba882f6b0d07 with working tree changes
Modifiers
sealed

Finite Gregorian recurrence input. Expansion retains local wall time, skips nonexistent month days, and never reads a native Project recurrence rule. Working calendars are applied later by scheduling.

Inheritance

  • object
  • ProjectRecurrenceRule

Constructors

public ProjectRecurrenceRule() #

Methods

public IReadOnlyList<DateTime> Expand(int maxCalendarDays = 36600, CancellationToken cancellationToken = default) #

Expands completely or fails without a partial result. MaxCalendarDays bounds the search, including dates skipped by the pattern.

Parameters

maxCalendarDays int = 36600 optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<DateTime>

Properties

public DateTime Start { get; set; } #

First eligible local date and time; its period anchors the interval.

public ProjectRecurrenceFrequency Frequency { get; set; } #

Daily, weekly, monthly or yearly pattern.

public int Interval { get; set; } #

Positive period stride.

public int Count { get; set; } #

Required finite number of occurrences, from 1 through 100000.

public IList<DayOfWeek> DaysOfWeek { get; } #

Weekly selections. Empty selects Start's weekday. Other frequencies require an empty list.

public DayOfWeek FirstDayOfWeek { get; set; } #

Weekly period boundary, Monday by default.

public int? DayOfMonth { get; set; } #

Monthly/yearly day number. Null uses Start's day when no ordinal weekday is selected.

public int? Month { get; set; } #

Yearly month number. Null uses Start's month.

public DayOfWeek? WeekDay { get; set; } #

Monthly/yearly ordinal weekday, used together with WeekOrdinal.

public int? WeekOrdinal { get; set; } #

1 through 5 or -1 for the last matching weekday. Missing fifth weekdays are skipped.