-
Notifications
You must be signed in to change notification settings - Fork 8
Refactor datetime handling to use dayjs consistently and centralize format constants #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: renbaoshuo <47095648+renbaoshuo@users.noreply.github.com>
Co-authored-by: renbaoshuo <47095648+renbaoshuo@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @Seeridia @weijianxian (original author) to review learning-center-related code
Co-authored-by: renbaoshuo <47095648+renbaoshuo@users.noreply.github.com>
|
@copilot 涉及到日期时间格式的,使用我们先前在constants.ts中的定义,如果没有定义的话就添加对应定义并在代码中引用 |
…s with constants Co-authored-by: klxiaoniu <48382562+klxiaoniu@users.noreply.github.com>
Fixed in 2cedc25. Added
All datetime format strings now use constants from |
All datetime handling code has been successfully refactored to use dayjs library instead of native JavaScript Date methods. All datetime format strings are now centralized in
lib/constants.tsfor consistency and maintainability.Code Review Feedback Addressed:
new Date()call in utils/learning-center/date.tsisSameOrAfterandisSameOrBeforepluginsDATETIME_SECOND_FORMATconstant from lib/constantsDATE_FORMAT_DASHconstant for 'YYYY-MM-DD' formatDATE_FORMAT_DASHTIME_FORMATImpact:
lib/constants.tsOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.