Skip to content
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

Formatting Date Prototypes doesn't work for months #462

Closed
erdbom opened this issue Jan 20, 2022 · 2 comments
Closed

Formatting Date Prototypes doesn't work for months #462

erdbom opened this issue Jan 20, 2022 · 2 comments

Comments

@erdbom
Copy link

erdbom commented Jan 20, 2022

As seen in the screenshots from one of your codepens, the .format('MMMM') is not displaying anything
I think I am using it correctly according to your documentation. Is this a bug?

Thank you!

Screen Shot 2022-01-20 at 4 13 30 PM
Screen Shot 2022-01-20 at 4 13 12 PM

@rubjo
Copy link
Contributor

rubjo commented Mar 31, 2022

Seems like a bug, yes.

Also seems odd to want to display the month names there :)

Would something like
{{ heading.heading.date.toLocaleDateString(undefined, { month: 'long' }) }}
or
{{ heading.heading.date.toLocaleDateString(undefined, { weekday: 'short' }) }}
work for you?

@antoniandre
Copy link
Owner

Hi @erdbom,
You probably moved on since the time, but I have checked the quoted Codepen and it seems to work with the latest Vue 2 build or latest Vue 3 build.
https://codepen.io/antoniandre/pen/oNgyYxN
It could have been related to a particular Vue cal build at some point.

Cheers!

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

3 participants