You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
914 B
41 lines
914 B
1 year ago
|
package cn.teammodel.utils;
|
||
|
|
||
|
import cn.teammodel.model.entity.school.Semester;
|
||
|
|
||
|
import java.time.LocalDate;
|
||
|
import java.util.List;
|
||
|
|
||
|
/**
|
||
|
* 学校中年级,学年,日期相关的工具类
|
||
|
* @author winter
|
||
|
* @create 2023-11-28 10:15
|
||
|
*/
|
||
|
public class SchoolDateUtil {
|
||
|
|
||
|
/**
|
||
|
* 通过当前时间与学校的学期安排获取当前的学年
|
||
|
* 学校学期:
|
||
|
* <pre>
|
||
|
* "semesters": [
|
||
|
* {
|
||
|
* "name": "下学期",
|
||
|
* "start": 0,
|
||
|
* "month": 3,
|
||
|
* "day": 1,
|
||
|
* "id": "2"
|
||
|
* },
|
||
|
* {
|
||
|
* "name": "上学期",
|
||
|
* "start": 1,
|
||
|
* "month": 9,
|
||
|
* "day": 1,
|
||
|
* "id": "1"
|
||
|
* }
|
||
|
* <pre/>
|
||
|
*/
|
||
|
public static String getSemesterByNow(List<Semester> semesters, LocalDate date) {
|
||
|
return "";
|
||
|
}
|
||
|
|
||
|
}
|