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
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
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 return22
. Or the doc should be updated.Reproduction
https://codesandbox.io/s/vibrant-cartwright-hcjxc?file=/src/App.vue:161-170
System Info
Screenshot
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: