|
|
@@ -8,7 +8,7 @@ export function timeFix() {
|
|
|
|
|
|
/**
|
|
|
* 学期判断
|
|
|
- * 返回 [学期开始时间戳, 当前时间戳]
|
|
|
+ * 返回 [学期开始时间戳, 明日时间戳]
|
|
|
*/
|
|
|
export function getSemesterTimestamps() {
|
|
|
const now = new Date()
|
|
|
@@ -18,7 +18,7 @@ export function getSemesterTimestamps() {
|
|
|
// 下学期:2 月 1 日 ~ 8 月 31 日
|
|
|
// 上学期:8 月 31 日 ~ 次年 2 月 1 日
|
|
|
// 1 月属于上一年的上学期
|
|
|
- return [(now >= feb1ThisYear && now < aug31ThisYear) ? feb1ThisYear : new Date(now < feb1ThisYear ? year - 1 : year, 7, 31, 0, 0, 0, 0).getTime(), now.getTime()]
|
|
|
+ return [(now >= feb1ThisYear && now < aug31ThisYear) ? feb1ThisYear.getTime() : new Date(now < feb1ThisYear ? year - 1 : year, 7, 31, 0, 0, 0, 0).getTime(), now.getTime() + 86400000]
|
|
|
}
|
|
|
|
|
|
export async function getNotice(key) {
|