1

I would like to display a date format based on a different locale. Ideally one that I can decide upon after a query to a remote server. (The value to be put in the date field is retrieved in this same query).
I'm trying to use this answer but am getting an error: Invalid language tag: en_US

code:

@NgModule({...
  providers: [
{provide: LOCALE_ID, useValue: "en_US"}
],
...

I'm obviously missing some kind of resource, but I have no idea what.

Community
  • 1
  • 1
AvailableName
  • 666
  • 4
  • 13
  • 24

1 Answers1

4

In the question you linked it has:"en-US"

However you have:"en_US"

fez
  • 511
  • 1
  • 10
  • 27