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

formatDate doesn't allow Intl.DateTimeFormat options #947

Open
waitingallday opened this issue Dec 4, 2023 · 0 comments
Open

formatDate doesn't allow Intl.DateTimeFormat options #947

waitingallday opened this issue Dec 4, 2023 · 0 comments
Assignees

Comments

@waitingallday
Copy link
Member

We are setting dateStyle as a default param, this prevents the use of any non-dateStyle formatting options

e.g.

formatDate(opt.date, { year: '2-digit' })

// returns Can't set option year when dateStyle is used

const defaultOptions: Intl.DateTimeFormatOptions = { dateStyle: 'medium' }

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

1 participant