CTCClassSchedule.AutomatedFootnotesConfig.getApplicableDateFootnote C# (CSharp) Method

getApplicableDateFootnote() private static method

Uses a section's start/end date to determine an applicable date footnote. By design, at most one date related footnote will be relevant to any given section. This method determines and returns the applicable footnote, should one exist.
private static getApplicableDateFootnote ( System.Boolean differentStartFlag, System.Boolean differentEndFlag, System.DateTime startDate, System.DateTime endDate ) : AutomatedFootnoteElement
differentStartFlag System.Boolean Is the course a late start course?
differentEndFlag System.Boolean Does the course have a different end date than normal?
startDate System.DateTime The course's scheduled start date.
endDate System.DateTime The courses scheduled end date.
return AutomatedFootnoteElement
        private static AutomatedFootnoteElement getApplicableDateFootnote(Boolean differentStartFlag, Boolean differentEndFlag, DateTime startDate, DateTime endDate)
        {
            AutomatedFootnoteElement footnote = null;

            // If the section start and end date are identical
            if (startDate.Date.Equals(endDate.Date))
            {
                footnote = Footnotes("identicalStartAndEndDates");
            }
            else
            {
                // If the section has both a different start and end date than the default
                if (differentStartFlag && differentEndFlag)
                {
                    footnote = Footnotes("differentStartAndEndDates");
                }
                else if (differentStartFlag) // If the section only has a different start date
                {
                    footnote = Footnotes("startDate");
                }
                else if (differentEndFlag) // If the section has a different end date
                {
                    footnote = Footnotes("endDate");
                }
            }

            return footnote;
        }