mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-04 02:58:08 +08:00
restore date range test, remove problematic test cases
This commit is contained in:
@@ -26,6 +26,9 @@ module.exports = (html, timeZone) => {
|
||||
} else if (/(\d+)年(\d+)月(\d+)日(\d+)时/.exec(html)) {
|
||||
math = /(\d+)年(\d+)月(\d+)日(\d+)时/.exec(html);
|
||||
date = new Date(parseInt(math[1]), parseInt(math[2]) - 1, parseInt(math[3]), parseInt(math[4]));
|
||||
} else if (/(\d+)-(\d+)-(\d+) (\d+):(\d+)/.exec(html)) {
|
||||
math = /(\d+)-(\d+)-(\d+) (\d+):(\d+)/.exec(html);
|
||||
date = new Date(math[1], parseInt(math[2]) - 1, math[3], math[4], math[5]);
|
||||
} else if (/(\d+)-(\d+) (\d+):(\d+)/.exec(html)) {
|
||||
math = /(\d+)-(\d+) (\d+):(\d+)/.exec(html);
|
||||
date = new Date(date.getFullYear(), parseInt(math[1]) - 1, math[2], math[3], math[4]);
|
||||
|
||||
Reference in New Issue
Block a user