Class CalendarException
Namespace: Aspose.Tasks
Assembly: Aspose.Tasks.dll (25.2.0)
Represent exceptional time periods in a calendar.
[ClassInterface(ClassInterfaceType.AutoDual)]
public sealed class CalendarException
Inheritance
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
CalendarException()
Initializes a new instance of the Aspose.Tasks.CalendarException class.
public CalendarException()
Properties
DayWorking
Gets or sets a value indicating whether the specified date or day type is working.
public bool DayWorking { get; set; }
Property Value
DaysOfWeek
Gets the DayTypeCollection for this object. The days of the week on which the exception is valid.
public DayTypeCollection DaysOfWeek { get; }
Property Value
EnteredByOccurrences
Gets or sets a value indicating whether the range of recurrence is defined by entering a number of occurrences. False specifies that the range of recurrence is defined by entering a finish date.
public bool EnteredByOccurrences { get; set; }
Property Value
FromDate
Gets or sets the beginning of the exception time.
public DateTime FromDate { get; set; }
Property Value
Month
Gets or sets the month for which an exception recurrence is scheduled.
public Month Month { get; set; }
Property Value
MonthDay
Gets or sets the day of a month on which an exception recurrence is scheduled.
public int MonthDay { get; set; }
Property Value
MonthItem
Gets or sets the month item for which an exception recurrence is scheduled.
public MonthItemType MonthItem { get; set; }
Property Value
MonthPosition
Gets or sets the position of a month item within a month.
public MonthPosition MonthPosition { get; set; }
Property Value
Name
Gets or sets the name of the exception.
public string Name { get; set; }
Property Value
Occurrences
Gets or sets the number of occurrences for which the calendar exception is valid.
public int Occurrences { get; set; }
Property Value
ParentCalendar
Gets the parent calendar for this object.
public Calendar ParentCalendar { get; }
Property Value
Period
Gets or sets the period of recurrence for the exception.
public int Period { get; set; }
Property Value
ToDate
Gets or sets the end of the exception time.
public DateTime ToDate { get; set; }
Property Value
Type
Gets or sets the exception type.
public CalendarExceptionType Type { get; set; }
Property Value
WorkingTimes
Gets or sets the WorkingTimeCollection object.
The collection of working times that defines the time worked on the weekday.
public WorkingTimeCollection WorkingTimes { get; set; }
Property Value
Methods
CheckException(DateTime)
Returns true if the specified instance of the System.DateTime struct is the exception day.
public bool CheckException(DateTime dt)
Parameters
dt
DateTime
the specified instance of the System.DateTime struct.
Returns
Returns true if System.DateTime value is the exception day; otherwise, false.
Delete()
Deletes the Exception instance from parent calendar CalendarExceptionCollection object.
public void Delete()
GetExceptionDates()
Returns dates on which the calendar exception is applicable.
public IEnumerable<datetime> GetExceptionDates()
Returns
IEnumerable<DateTime>
Returns a collection of exception dates the calendar exception is applicable for.
GetWorkingTime()
Returns the working time for a calendar exception.
public TimeSpan GetWorkingTime()
Returns
Returns working time for this calendar exception.