Aspose.Tasks for C++
Aspose::Tasks::ICalendar Class Referenceabstract

Represents a calendar abstraction which can be used for various calculations of dates and durations. More...

#include <ICalendar.h>

Inherits Object.

Inherited by Aspose::Tasks::Calendar.

Public Member Functions

virtual System::DateTime GetStartDateFromFinishAndDuration (System::DateTime finish, Duration duration)=0
 Returns start date based on the specified finish date and duration. More...
 
virtual System::DateTime GetStartDateFromFinishAndDuration (System::DateTime finish, System::TimeSpan duration)=0
 Returns start date based on specified finish date and duration. More...
 
virtual bool IsDayWorking (System::DateTime dt)=0
 Determines whether the specified day is a working day according to the calendar. More...
 
virtual System::SharedPtr< WorkUnitGetWorkingHours (System::DateTime start, System::DateTime finish)=0
 Returns WorkUnit - Start, Finish and Duration of working hours for the specified date time interval. More...
 
virtual System::TimeSpan GetWorkingHours (System::DateTime dt)=0
 Returns the amount of working hours at the specified date. More...
 
virtual System::TimeSpan GetWorkingHoursTimeSpan (System::DateTime start, System::DateTime finish)=0
 Returns amount of working hours between the specified dates. More...
 
virtual System::DateTime GetFinishDateByStartAndWork (System::DateTime start, Duration work)=0
 Calculates the date when the specified amount of work time will pass according to the calendar. More...
 
virtual System::DateTime GetFinishDateByStartAndWork (System::DateTime start, System::TimeSpan work)=0
 Calculates the date when the specified amount of work time will pass according to the calendar. More...
 
virtual System::DateTime GetTaskFinishDateFromDuration (System::SharedPtr< Task > task, System::TimeSpan duration)=0
 Calculates the task finish date and time from its start date, split parts and the work duration. More...
 
virtual System::SharedPtr< WorkingTimeCollectionGetWorkingTimes (System::DateTime dt)=0
 Returns WorkingTimeCollection of working times for the specified date. More...
 
virtual System::DateTime GetPreviousWorkingDayEnd (System::DateTime date)=0
 Calculates the end of the previous working date from the specified date. More...
 
virtual System::DateTime GetNextWorkingDayStart (System::DateTime date)=0
 Calculates next working day start for the specified date. More...
 
virtual System::DateTime GetWorkStart (System::DateTime date)=0
 Calculates next working time start beginning from the specified date and time. More...
 
virtual bool IsEmpty ()=0
 Returns whether the calendar doesn't have working hours defined. More...
 

Detailed Description

Represents a calendar abstraction which can be used for various calculations of dates and durations.

Member Function Documentation

◆ GetFinishDateByStartAndWork() [1/2]

virtual System::DateTime Aspose::Tasks::ICalendar::GetFinishDateByStartAndWork ( System::DateTime  start,
Duration  work 
)
pure virtual

Calculates the date when the specified amount of work time will pass according to the calendar.

Parameters
startStart date.
workWork duration.
Returns
Finish date.

Implemented in Aspose::Tasks::Calendar.

◆ GetFinishDateByStartAndWork() [2/2]

virtual System::DateTime Aspose::Tasks::ICalendar::GetFinishDateByStartAndWork ( System::DateTime  start,
System::TimeSpan  work 
)
pure virtual

Calculates the date when the specified amount of work time will pass according to the calendar.

Parameters
startStart date.
workWork duration.
Returns
Finish date.

Implemented in Aspose::Tasks::Calendar.

◆ GetNextWorkingDayStart()

virtual System::DateTime Aspose::Tasks::ICalendar::GetNextWorkingDayStart ( System::DateTime  date)
pure virtual

Calculates next working day start for the specified date.

Parameters
dateThe date to get next working day start for.
Returns
Next working day start System::DateTime.

Implemented in Aspose::Tasks::Calendar.

◆ GetPreviousWorkingDayEnd()

virtual System::DateTime Aspose::Tasks::ICalendar::GetPreviousWorkingDayEnd ( System::DateTime  date)
pure virtual

Calculates the end of the previous working date from the specified date.

Parameters
datethe date to calculate the previous working day end.
Returns
The end of the previous working day end

Implemented in Aspose::Tasks::Calendar.

◆ GetStartDateFromFinishAndDuration() [1/2]

virtual System::DateTime Aspose::Tasks::ICalendar::GetStartDateFromFinishAndDuration ( System::DateTime  finish,
Duration  duration 
)
pure virtual

Returns start date based on the specified finish date and duration.

Parameters
finishThe specified finish date.
durationThe specified duration.
Returns
Calculated start date.

Implemented in Aspose::Tasks::Calendar.

◆ GetStartDateFromFinishAndDuration() [2/2]

virtual System::DateTime Aspose::Tasks::ICalendar::GetStartDateFromFinishAndDuration ( System::DateTime  finish,
System::TimeSpan  duration 
)
pure virtual

Returns start date based on specified finish date and duration.

Parameters
finishThe specified finish date.
durationThe specified duration.
Returns
Calculated start date.

Implemented in Aspose::Tasks::Calendar.

◆ GetTaskFinishDateFromDuration()

virtual System::DateTime Aspose::Tasks::ICalendar::GetTaskFinishDateFromDuration ( System::SharedPtr< Task task,
System::TimeSpan  duration 
)
pure virtual

Calculates the task finish date and time from its start date, split parts and the work duration.

Parameters
taskThe task to calculate finish date for.
durationThe duration to calculate.
Returns
Task's finish date for the given start date and duration.

Returns DateTime.MinValue if task is summary, null or its start date is not set.

Implemented in Aspose::Tasks::Calendar.

◆ GetWorkingHours() [1/2]

virtual System::TimeSpan Aspose::Tasks::ICalendar::GetWorkingHours ( System::DateTime  dt)
pure virtual

Returns the amount of working hours at the specified date.

Parameters
dtThe date to get working hours for.
Returns
Working hours at the specified date.

Implemented in Aspose::Tasks::Calendar.

◆ GetWorkingHours() [2/2]

virtual System::SharedPtr<WorkUnit> Aspose::Tasks::ICalendar::GetWorkingHours ( System::DateTime  start,
System::DateTime  finish 
)
pure virtual

Returns WorkUnit - Start, Finish and Duration of working hours for the specified date time interval.

Parameters
startStart date of the interval.
finishFinish date of the interval.
Returns
Instance of WorkUnit class containing Start, Finish and Duration of working hours.

Implemented in Aspose::Tasks::Calendar.

◆ GetWorkingHoursTimeSpan()

virtual System::TimeSpan Aspose::Tasks::ICalendar::GetWorkingHoursTimeSpan ( System::DateTime  start,
System::DateTime  finish 
)
pure virtual

Returns amount of working hours between the specified dates.

Parameters
startStart date of the interval.
finishFinish date of the interval.
Returns
Amount of working hours according to the calendar instance.

Implemented in Aspose::Tasks::Calendar.

◆ GetWorkingTimes()

virtual System::SharedPtr<WorkingTimeCollection> Aspose::Tasks::ICalendar::GetWorkingTimes ( System::DateTime  dt)
pure virtual

Returns WorkingTimeCollection of working times for the specified date.

Parameters
dtThe date to get working times for.
Returns
Collection of WorkingTime instances.

Implemented in Aspose::Tasks::Calendar.

◆ GetWorkStart()

virtual System::DateTime Aspose::Tasks::ICalendar::GetWorkStart ( System::DateTime  date)
pure virtual

Calculates next working time start beginning from the specified date and time.

Parameters
dateThe date and time.
Returns
The nearest working time start.

Implemented in Aspose::Tasks::Calendar.

◆ IsDayWorking()

virtual bool Aspose::Tasks::ICalendar::IsDayWorking ( System::DateTime  dt)
pure virtual

Determines whether the specified day is a working day according to the calendar.

Parameters
dtThe date to check whether the day is working.
Returns
True if the day is a working day.

Implemented in Aspose::Tasks::Calendar.

◆ IsEmpty()

virtual bool Aspose::Tasks::ICalendar::IsEmpty ( )
pure virtual

Returns whether the calendar doesn't have working hours defined.

Implemented in Aspose::Tasks::Calendar.