vuepress / vuepress-theme-blog

Default blog theme for VuePress.
https://vuepress-theme-blog.billyyyyy3320.com/
MIT License
211 stars 129 forks source link

Invalid date #25

Closed unlikenesses closed 4 years ago

unlikenesses commented 4 years ago

Bug report

Steps to reproduce

  1. yarn create vuepress
  2. yarn install
  3. Edit a post. Change the date of the post to 2019-11-30.
  4. yarn dev
  5. Go to localhost:8080
  6. Instead of seeing "30 November 2019", you see "Invalid date".

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

billyyyyy3320 commented 4 years ago

Thanks for report. Contribution Welcome.

cireu commented 4 years ago

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.

cireu commented 4 years ago

@newsbielt703 Please check #27

himself65 commented 4 years ago

I think we can use package moment-js, and allow users to modify themself's date formate