calculateWeeksNumber static method
Calculate the max number of weeks in a date interval between
monthStartDate
and monthEndDate
which have the same month.
Implementation
static double calculateWeeksNumber(DateTime startDate, DateTime endDate) {
var daysBetweenDates = endDate.difference(startDate);
return daysBetweenDates.inDays / DateTime.daysPerWeek;
}