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;
}