mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-14 17:19:37 +08:00
fix(utils): parse relative date with meridiem (#9775)
* fix(utils): parse relative date with meridiem * fix: use regex
This commit is contained in:
@@ -112,6 +112,10 @@ describe('parseRelativeDate', () => {
|
||||
expect(+new Date(parseRelativeDate('Today 08:00'))).toBe(+date + 8 * hour);
|
||||
});
|
||||
|
||||
it('Today, h:m a', () => {
|
||||
expect(+new Date(parseRelativeDate('Today, 8:00 pm'))).toBe(+date + 20 * hour);
|
||||
});
|
||||
|
||||
it('TDA H:m:s', () => {
|
||||
expect(+new Date(parseRelativeDate('TDA 08:00:00'))).toBe(+date + 8 * hour);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user