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 +};