You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a following use case:
When I have locale set to en-gb and enter 23/01/2023 I need it to be able to get correct javascript date but I don't see a way to get it using Intl. Maybe there is already a proposal with it? If so please point me to it Thank you!.
// Kinda want something like DateTimeFromLocale
const dateFromEnGB = new Intl.DateTimeFromLocale('en-gb').format('23/01/2023').toFormat({
day: '2-digit',
month: '2-digit',
year: 'numeric',
});
The text was updated successfully, but these errors were encountered:
Hi, thanks for the suggestion. You're not alone as many people have suggested this; it seems like a simple thing to do but it's actually problematic for several reasons. I recommend you read the discussion in tc39/ecma402#342 as a background. There's also a thread at js-temporal/proposal-temporal-v2#2 to discuss about possibly including a limited version of it in a future proposal.
(I'll close this issue as this isn't the place to request the creation of a proposal — discussion should continue in one of those two places or on our Discourse instance, https://es.discourse.group)
I have a following use case:
When I have locale set to
en-gb
and enter23/01/2023
I need it to be able to get correct javascript date but I don't see a way to get it using Intl. Maybe there is already a proposal with it? If so please point me to it Thank you!.The text was updated successfully, but these errors were encountered: