diff --git a/lib/routes/who/news-room.js b/lib/routes/who/news-room.js index 422149b22..9f32ded87 100644 --- a/lib/routes/who/news-room.js +++ b/lib/routes/who/news-room.js @@ -1,7 +1,7 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); const url = require('url'); -const date = require('@/utils/date'); +const { parseDate } = require('@/utils/parse-date'); const host = 'https://www.who.int/'; @@ -20,7 +20,7 @@ module.exports = async (ctx) => { const $elem = $(elem); const title = $elem.find('p').text(); const link = url.resolve(host, $elem.find('a').attr('href')); - const pubDate = date($elem.find('.timestamp').text()); + const pubDate = parseDate($elem.find('.timestamp').text(), 'YYYY年M月D日'); const item = { title,