|
|
|
|
@ -35,21 +35,10 @@ class CourseScreenState extends State<CourseScreen> {
|
|
|
|
|
mondayTime = mondayTime.subtract(Duration(days: 1));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mondayTime.year; //2020 年
|
|
|
|
|
mondayTime.month; //6(这里和js中的月份有区别,js中是从0开始,dart则从1开始,我们无需再进行加一处理) 月
|
|
|
|
|
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
|
|
|
|
|
|