CronExpressionDescriptor.ExpressionDescriptor.GenerateBetweenSegmentDescription C# (CSharp) Method

GenerateBetweenSegmentDescription() protected method

Generates the between segment description
protected GenerateBetweenSegmentDescription ( string betweenExpression, string>.Func getBetweenDescriptionFormat, string>.Func getSingleItemDescription ) : string
betweenExpression string
getBetweenDescriptionFormat string>.Func
getSingleItemDescription string>.Func
return string
        protected string GenerateBetweenSegmentDescription(string betweenExpression, Func<string, string> getBetweenDescriptionFormat, Func<string, string> getSingleItemDescription)
        {
            string description = string.Empty;
            string[] betweenSegments = betweenExpression.Split('-');
            string betweenSegment1Description = getSingleItemDescription(betweenSegments[0]);
            string betweenSegment2Description = getSingleItemDescription(betweenSegments[1]);
            betweenSegment2Description = betweenSegment2Description.Replace(":00", ":59");
            var betweenDescriptionFormat = getBetweenDescriptionFormat(betweenExpression);
            description += string.Format(betweenDescriptionFormat, betweenSegment1Description, betweenSegment2Description);

            return description;
        }