android - 课程格子的课表第几周是如何自动调整的
PHPz
PHPz 2017-04-17 14:36:23
0
4
390

课程格子的课表第几周是如何自动调整的?
是通过什么监听的 还是有什么特殊的的方法?

PHPz
PHPz

学习是最好的投资!

reply all(4)
PHPzhong

My grid is asking about my school start date

刘奇

It is very convenient to use the new data api in Java 8

 //开学日期
  LocalDate start = LocalDate.of(2015,9,7);
  WeekFields week = WeekFields.of(Locale.getDefault());
  int startWeek = start.get(week.weekOfWeekBasedYear());

  LocalDate today = LocalDate.now();
  WeekFields weekFields = WeekFields.of(Locale.getDefault());
  int todayWeek = today.get(weekFields.weekOfWeekBasedYear());

  int weeks = todayWeek-startWeek+1;
   System.out.println("当前是第"+weeks+"周");
        
Peter_Zhu

Just finished writing this function. Users need to give an initial week when using this software for the first time, and then add weeks through logic

刘奇

Just get the current date each time and compare it with the initial date

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!