MonthItemType Enumeration |
Specifies the month item for which an exception recurrence is scheduled.
Namespace:
Aspose.Tasks
Assembly:
Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntaxpublic enum MonthItemType
Public Enumeration MonthItemType
public enum class MonthItemType
Members
| Member name | Value | Description |
---|
| Undefined | -1 |
Indicates Undefined month item type.
|
| Day | 0 |
Indicates Day month item type.
|
| Weekday | 1 |
Indicates Weekday month item type.
|
| WeekendDay | 2 |
Indicates WeekendDay month item type.
|
| Sunday | 3 |
Indicates Sunday month item type.
|
| Monday | 4 |
Indicates Monday month item type.
|
| Tuesday | 5 |
Indicates Tuesday month item type.
|
| Wednesday | 6 |
Indicates Wednesday month item type.
|
| Thursday | 7 |
Indicates Thursday month item type.
|
| Friday | 8 |
Indicates Friday month item type.
|
| Saturday | 9 |
Indicates Saturday month item type.
|
ExamplesShows how to define calendar exception by month day.
var project = new Project(DataDir + "project_test.mpp");
var calendar = project.Calendars.Add("Calendar1");
var exception = new CalendarException();
exception.Type = CalendarExceptionType.MonthlyByDay;
exception.FromDate = new DateTime(2010, 1, 1);
exception.ToDate = new DateTime(2020, 12, 31);
exception.Month = Month.December;
exception.MonthDay = 1;
exception.MonthItem = MonthItemType.Undefined;
exception.MonthPosition = MonthPosition.Last;
exception.Period = 5;
Console.WriteLine("Is date an exception date: " + exception.CheckException(new DateTime(2012, 12, 1)));
calendar.Exceptions.Add(exception);
See Also