We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug dayjs('2024年10月17日').format('YYYY-MM-DD') 报错:'Invalid Date'
以下的是正常的 dayjs('2024/10/17').format('YYYY-MM-DD')
Expected behavior dayjs('2024年10月17日').format('YYYY-MM-DD') 能正常解析出来:2024-10-17
Information
The text was updated successfully, but these errors were encountered:
use customParseFormat
var customParseFormat = require("dayjs/plugin/customParseFormat"); dayjs.extend(customParseFormat);
dayjs('2024年10月17日', 'YYYY-MM-DD').format('YYYY-MM-DD');
Sorry, something went wrong.
这个方法不够通用,按理说,这种中文日期也是高频的存在,应该是能内置解析的。
No branches or pull requests
Describe the bug
dayjs('2024年10月17日').format('YYYY-MM-DD')
报错:'Invalid Date'
以下的是正常的
dayjs('2024/10/17').format('YYYY-MM-DD')
Expected behavior
dayjs('2024年10月17日').format('YYYY-MM-DD')
能正常解析出来:2024-10-17
Information
The text was updated successfully, but these errors were encountered: