修复课程表日期显示的bug

pull/7/head
gexinghai 3 years ago
parent f8938fb12a
commit bec6671e50

@ -35,21 +35,10 @@ class CourseScreenState extends State<CourseScreen> {
mondayTime = mondayTime.subtract(Duration(days: 1));
}
mondayTime.year; //2020
mondayTime.month; //6(jsjs0dart1)
mondayTime.day; //6
// nowTime.hour ;//6
// nowTime.minute ;//6
// nowTime.second ;//6
for (int i = 0; i < 7; i++) {
dateList.add("${mondayTime.month}/${mondayTime.day + i}");
if ((mondayTime.day + i) == DateTime.now().day) {
setState(() {
currentWeekIndex = i + 1;
});
}
dateList.add("${mondayTime.month}-${mondayTime.day}");
mondayTime = mondayTime.add(Duration(days: 1));
}
// print('Recent monday '+DateTime.now().day.toString());
}
@override

Loading…
Cancel
Save