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

Class constructor DateTimeFormat cannot be invoked without 'new' #25

Closed
digaus opened this issue Jan 30, 2024 · 2 comments
Closed

Class constructor DateTimeFormat cannot be invoked without 'new' #25

digaus opened this issue Jan 30, 2024 · 2 comments

Comments

@digaus
Copy link

digaus commented Jan 30, 2024

When using this polyfill with any-date-parser I get this error.

Browser allows creation of DateTimeFormat without new but this polyfill does not.

Is this according to spec or should I post this issue on any-date-parser ?

Edit: According to MDN docs it should be possible without new
image

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#return_value

@arshaw
Copy link
Member

arshaw commented Feb 6, 2024

This is fixed in v0.2.1

@digaus please write back here if any further problems with Intl.DateTimeFormat and new

@arshaw arshaw closed this as completed Feb 6, 2024
@digaus
Copy link
Author

digaus commented Feb 6, 2024

Looking good, thanks for the fast fix :)

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