Example #1
0
        public bool IsCorrectionRequiredFromA(PathElement pathElement)
        {
            Init();
            var lastTimeInCurrentDay = TimeUtil.ToInt(LastDeparture.AddMinutes(pathElement.DistanceFromA));

            return(lastTimeInCurrentDay < GetFirstDepartureFromZ(pathElement));
        }
Example #2
0
        public int GetLastDepartureFromZ(PathElement pathElement)
        {
            Init();
            var lastDeparture = LastDeparture.AddMinutes(FullInterval - pathElement.DistanceFromA);

            return(IsCorrectionRequiredFromZ(pathElement)
                ? TimeUtil.PlusOneDayToInt(lastDeparture)
                : TimeUtil.ToInt(lastDeparture));
        }
Example #3
0
        public int GetLastDepartureFromA(PathElement pathElement)
        {
            Init();
            DateTime lastDeparture = LastDeparture.AddMinutes(pathElement.DistanceFromA);

            if (IsCorrectionRequiredFromA(pathElement))
            {
                return(TimeUtil.PlusOneDayToInt(lastDeparture));
            }

            return(TimeUtil.ToInt(lastDeparture));
        }