Reputation: 706
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.
Upvotes: 1
Views: 2956