Skip to content

feat(utils): add parse date range to extract start&end date - #22905

Open
magazian wants to merge 1 commit into
DIYgod:masterfrom
magazian:feat/parse-date-range
Open

feat(utils): add parse date range to extract start&end date#22905
magazian wants to merge 1 commit into
DIYgod:masterfrom
magazian:feat/parse-date-range

Conversation

@magazian

@magazian magazian commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Involved Issue / 该 PR 相关 Issue

Close #

Example for the Proposed Route(s) / 路由地址示例

NOROUTE

New RSS Route Checklist / 新 RSS 路由检查表

  • New Route / 新的路由
  • Anti-bot or rate limit / 反爬/频率限制
    • If yes, do your code reflect this sign? / 如果有, 是否有对应的措施?
  • Date and time / 日期和时间
    • Parsed / 可以解析
    • Correct time zone / 时区正确
  • New package added / 添加了新的包
  • Puppeteer

Note / 说明

Adds a new utility lib/utils/parse-date-range.ts that extracts a start date and end date from free-form date range strings, returning both in YYYY-MM-DD format, can support both CN&EN date range format.
This utility was originally written in the chnmuseum route. It is now promoted to a standalone, well-tested helper so that other routes (e.g. museum, gallery, and exhibition feeds) can reuse it directly instead of reimplementing the same logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant