RSSHub/lib/utils/parse-date.js

5 lines
163 B
JavaScript

const dayjs = require("dayjs");
dayjs.extend(require('dayjs/plugin/customParseFormat'));
module.exports = (date, ...options) => dayjs(date, ...options).toDate();