public bool IsCorrectionRequiredFromA(PathElement pathElement) { Init(); var lastTimeInCurrentDay = TimeUtil.ToInt(LastDeparture.AddMinutes(pathElement.DistanceFromA)); return(lastTimeInCurrentDay < GetFirstDepartureFromZ(pathElement)); }
public int GetLastDepartureFromZ(PathElement pathElement) { Init(); var lastDeparture = LastDeparture.AddMinutes(FullInterval - pathElement.DistanceFromA); return(IsCorrectionRequiredFromZ(pathElement) ? TimeUtil.PlusOneDayToInt(lastDeparture) : TimeUtil.ToInt(lastDeparture)); }
public int GetLastDepartureFromA(PathElement pathElement) { Init(); DateTime lastDeparture = LastDeparture.AddMinutes(pathElement.DistanceFromA); if (IsCorrectionRequiredFromA(pathElement)) { return(TimeUtil.PlusOneDayToInt(lastDeparture)); } return(TimeUtil.ToInt(lastDeparture)); }