Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

ProjectCalendar

OfficeIMO.Project

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

A base or derived calendar with stored working days and exceptions; no scheduling runs during editing.

Inheritance

Usage

Explore 15 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 5

Methods

public DateTime AddWorkingMinutes(DateTime start, decimal minutes, int maxCalendarDays = 36600, CancellationToken cancellationToken = default) #

Adds signed working minutes, skipping non-working intervals. Uses local wall time without host timezone or DST conversion.

Parameters

start System.DateTime required
minutes decimal required
maxCalendarDays int = 36600 optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

DateTime
public IReadOnlyList<ProjectWorkingRange> GetWorkingIntervals(DateTime date, CancellationToken cancellationToken = default) #

Returns effective intervals within one local date, including an overnight shift started the preceding day.

Parameters

date System.DateTime required
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<ProjectWorkingRange>
public ProjectWeekDay SetWorkingDay(DayOfWeek day, params ProjectWorkingTime[] times) #

Replaces the working intervals for a day without changing other calendar days.

Parameters

day System.DayOfWeek required
times OfficeIMO.Project.ProjectWorkingTime[] required
public decimal WorkingMinutesBetween(DateTime start, DateTime finish, int maxCalendarDays = 36600, CancellationToken cancellationToken = default) #

Counts signed working minutes between local dates. Split shifts are counted once, even when intervals overlap.

Parameters

start System.DateTime required
finish System.DateTime required
maxCalendarDays int = 36600 optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

decimal

Properties

public ProjectCalendar? BaseCalendar { get; set; } #

The inherited calendar, or null for a base calendar.

public bool? 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.