getIndexWeekInMonth static method
本月的第几周
Implementation
static int getIndexWeekInMonth(DateTime dateTime) {
DateTime firstdayInMonth = new DateTime(dateTime.year, dateTime.month, 1);
Duration duration = dateTime.difference(firstdayInMonth);
// return (duration.inDays / 7).toInt() + 1;
return (duration.inDays ~/ 7) + 1;
}