Calendar.GetPreviousWorkingDayEnd

Calendar.GetPreviousWorkingDayEnd method

Calculates previous working date end from the specified date.

public DateTime GetPreviousWorkingDayEnd(DateTime date)
ParameterTypeDescription
dateDateTimethe specified instance of DateTime struct.

Return Value

Previous working day start DateTime

Examples

Shows how to get a previous working day end by using a calendar.

var project = new Project(DataDir + "Project1.mpp");

var calendar = project.Calendars.GetByUid(1);

// get previous working day end
var previousWorkingDayEnd = calendar.GetPreviousWorkingDayEnd(new DateTime(2020, 4, 10, 13, 0, 0));

// 9 April 2020 18:00 PM will be printed
Console.WriteLine(previousWorkingDayEnd);

See Also