getMonthLabel method

String getMonthLabel ()

Implementation

String getMonthLabel() {
  DateTime startingDayObj = rowStartingDate, endingDayObj = rowStartingDate.add(Duration(days: 6));
  String label = "";
  if (startingDayObj.month == endingDayObj.month) {
    label = "${getMonthName(startingDayObj)} ${startingDayObj.year}";
  } else {
    var startingDayYear = "${startingDayObj.year == endingDayObj.year ? "" : startingDayObj.year}";
    label = "${getMonthName(startingDayObj)} $startingDayYear / ${getMonthName(endingDayObj)} ${endingDayObj.year}";
  }
  return label;
}