API Reference
ProjectCalendar
A base or derived calendar with stored working days and exceptions; no scheduling runs during editing.
Inheritance
- ProjectNamedEntity
- ProjectCalendar
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Property ProjectCalendar.BaseCalendar
- Method ProjectCalendarCollection.Add
- Method ProjectCalendarCollection.AddStandardWorkingWeek
- Method ProjectCalendarCollection.GetByUid
- Method ProjectCalendarCollection.GetEnumerator
- Property ProjectCalendarCollection.Item
- Property ProjectDocument.Calendar
- Property ProjectResource.Calendar
- Property ProjectSettings.Calendar
- Property ProjectTask.Calendar
Accepted by parameters
- Method ProjectFluentDocument.Calendar
- Method ProjectResourceBuilder.Calendar
- Method ProjectTaskBuilder.Calendar
- Method ProjectCalendarCollection.Add
- Method ProjectCalendarCollection.Remove
- Method ProjectDocument.AddRecurringTask
Methods
public DateTime AddWorkingMinutes(DateTime start, Decimal minutes, Int32 maxCalendarDays = 36600, CancellationToken cancellationToken = default) #DateTimeAdds signed working minutes, skipping non-working intervals. Uses local wall time without host timezone or DST conversion.
Parameters
- start System.DateTime
- minutes System.Decimal
- maxCalendarDays System.Int32 = 36600
- cancellationToken System.Threading.CancellationToken = default
public IReadOnlyList<ProjectWorkingRange> GetWorkingIntervals(DateTime date, CancellationToken cancellationToken = default) #IReadOnlyList<ProjectWorkingRange>Returns effective intervals within one local date, including an overnight shift started the preceding day.
Parameters
- date System.DateTime
- cancellationToken System.Threading.CancellationToken = default
public ProjectWeekDay SetWorkingDay(DayOfWeek day, params ProjectWorkingTime[] times) #ProjectWeekDayReplaces the working intervals for a day without changing other calendar days.
Parameters
- day System.DayOfWeek
- times OfficeIMO.Project.ProjectWorkingTime[]
public Decimal WorkingMinutesBetween(DateTime start, DateTime finish, Int32 maxCalendarDays = 36600, CancellationToken cancellationToken = default) #DecimalCounts signed working minutes between local dates. Split shifts are counted once, even when intervals overlap.
Parameters
- start System.DateTime
- finish System.DateTime
- maxCalendarDays System.Int32 = 36600
- cancellationToken System.Threading.CancellationToken = default
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public ProjectCalendar BaseCalendar { get; set; } #The inherited calendar, or null for a base calendar.
public Nullable<Boolean> IsBaseCalendar { get; set; } #Source base-calendar flag; null preserves absence.
public ProjectCollection<ProjectWeekDay> WeekDays { get; } #Explicit day-of-week declarations; absent days may be inherited.
public ProjectCollection<ProjectCalendarException> Exceptions { get; } #Date exceptions, including retained unmodeled recurrence data.
public ProjectCollection<ProjectWorkWeek> WorkWeeks { get; } #Date-bounded weekday overrides, applied after date exceptions and before the ordinary week.
Inherited Properties
public String Name { get; set; } #public Int32 Uid { get; } #public Nullable<Guid> Guid { get; set; } #