Skip to content

Front Matter: inconsistent date property #2097

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

Closed
1 task done
Hill-98 opened this issue Dec 27, 2019 · 2 comments
Closed
1 task done

Front Matter: inconsistent date property #2097

Hill-98 opened this issue Dec 27, 2019 · 2 comments

Comments

@Hill-98
Copy link

Hill-98 commented Dec 27, 2019

  • I confirm that this is an issue rather than a question.

Bug report

1.png
2.png

As shown, if a two-digit date, $frontmatter.date have different performance behaviors.

This problem affects how the subject developer handles time

Steps to reproduce

https://github.com/Hill-98/vuepress-frontmatter-test

What is expected?

Same $frontmatter.date

What is actually happening?

Different $frontmatter.date

Other relevant information

NodeJS: 13.5.0

Browser: Chrome Canary 81

VuePress: 1.2.0

@billyyyyy3320
Copy link
Collaborator

Hi @Hill-98,

FYI, VuePress' using gray-matter which depends js-yaml which follows standard yaml types, so all available formats are here.

Currently, we've handled both 2-digits and single-digit in default blog theme, but if it's possible, we should support both format in VuePress.

@Hill-98
Copy link
Author

Hill-98 commented Jan 25, 2020

I think in all writing formats, the date attribute should return a uniform format.

@Hill-98 Hill-98 closed this as completed May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants