Closed unlikenesses closed 4 years ago
[ ] I prepared a reproduction repo, here is the reproduction repo:
[x] This issue doesn't need a reproduction repro, here is the steps to reproduce
yarn create vuepress
yarn install
date
2019-11-30
yarn dev
When a post has a date in the front matter, it should be rendered correctly.
For some dates, e.g. 2019-11-30, instead of the date, the string "Invalid date" is shown.
npx vuepress info:
npx vuepress info
System: OS: Windows 8.1 6.3.9600 CPU: (4) x64 Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz Binaries: Node: 8.11.2 - C:\Program Files\nodejs\node.EXE Yarn: 1.6.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.0.1 - C:\Program Files\nodejs\npm.CMD npmPackages: @vuepress/core: Not Found @vuepress/theme-default: Not Found vuepress: ^1.0.0 => 1.2.0 npmGlobalPackages: vuepress: Not Found
Thanks for report. Contribution Welcome.
I found that if I use "YYYY-MM-DD" instead of YYYY-MM-DD, it can be render correctly. I will try to resolve this.
"YYYY-MM-DD"
YYYY-MM-DD
@newsbielt703 Please check #27
I think we can use package moment-js, and allow users to modify themself's date formate
Bug report
Steps to reproduce
[ ] I prepared a reproduction repo, here is the reproduction repo:
[x] This issue doesn't need a reproduction repro, here is the steps to reproduce
yarn create vuepress
yarn install
date
of the post to2019-11-30
.yarn dev
What is expected?
When a post has a date in the front matter, it should be rendered correctly.
What is actually happening?
For some dates, e.g.
2019-11-30
, instead of the date, the string "Invalid date" is shown.Other relevant information
npx vuepress info
:System: OS: Windows 8.1 6.3.9600 CPU: (4) x64 Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz Binaries: Node: 8.11.2 - C:\Program Files\nodejs\node.EXE Yarn: 1.6.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.0.1 - C:\Program Files\nodejs\npm.CMD npmPackages: @vuepress/core: Not Found @vuepress/theme-default: Not Found vuepress: ^1.0.0 => 1.2.0 npmGlobalPackages: vuepress: Not Found