Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

$d doesn't support key format object as mentionned in the docs. #1502

Closed
5 tasks done
existe-deja opened this issue May 19, 2022 · 2 comments
Closed
5 tasks done

$d doesn't support key format object as mentionned in the docs. #1502

existe-deja opened this issue May 19, 2022 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed Status: PR Welcome Welcome to Pull Request Type: Feature Includes new features

Comments

@existe-deja
Copy link

Reporting a bug?

Following the doc I expect to be able to use a Intl.DateTimeFormat inside the $d function the same way I do with $n. But $d only accept string key and object format isn't supported.

For exemple : $d(new Date(), { year: 'numeric' }) But it doesn't work and I have to define all the formats in the config first.

It could be nice to support direct Intl format because you can have very specific formats you only use once.

Expected behavior

$d(new Date(), { year: '2-digit' }) should return 22. Or the doc should be updated.

Reproduction

https://codesandbox.io/s/vibrant-cartwright-hcjxc?file=/src/App.vue:161-170

System Info

"@vue/cli-plugin-babel": "4.1.1",
"vue": "2.6.14",
"vue-i18n": "8.27.1"

Screenshot

No response

Additional context

No response

Validations

@existe-deja existe-deja added the Status: Review Needed Request for review comments label May 19, 2022
@kazupon kazupon added help wanted Extra attention is needed good first issue Good for newcomers Status: PR Welcome Welcome to Pull Request Type: Feature Includes new features and removed Status: Review Needed Request for review comments labels May 25, 2022
@majdkhasib
Copy link
Contributor

@existe-deja What is the update on this?

@kazupon
Copy link
Owner

kazupon commented Oct 30, 2022

I've just released out v8.28.0
https://github.com/kazupon/vue-i18n/releases/tag/v8.28.0

Please check it!

@kazupon kazupon closed this as completed Oct 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers help wanted Extra attention is needed Status: PR Welcome Welcome to Pull Request Type: Feature Includes new features
Projects
None yet
Development

No branches or pull requests

3 participants