From 0575b09923901874fb47061fc8314fdb51c146ea Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Mon, 28 Dec 2020 16:58:30 +0000 Subject: [PATCH] Update sice.js --- lib/routes/universities/uestc/sice.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/universities/uestc/sice.js b/lib/routes/universities/uestc/sice.js index 3cfff9e23..53a08006f 100644 --- a/lib/routes/universities/uestc/sice.js +++ b/lib/routes/universities/uestc/sice.js @@ -7,7 +7,7 @@ module.exports = async (ctx) => { const $ = cheerio.load(response.data); const out = $('.notice p').map((index, item) => { item = $(item); - date = new Date(new Date().getFullYear() + '-' + item.find('a.date').text()); + let date = new Date(new Date().getFullYear() + '-' + item.find('a.date').text()); if (new Date() < date) { date = new Date((new Date().getFullYear() - 1) + '-' + item.find('a.date').text()); } @@ -26,4 +26,4 @@ module.exports = async (ctx) => { description: '电子科技大学信息与通信工程学院通知公告', item: out }; -}; \ No newline at end of file +};