vidya
vidya

Reputation: 83

I need to display the datezone according to country in Angular

Currently I am displaying the dateZone of IST and I need to display the datezone according to the users location.

app.component.html:

<td>{{scan.createdOn + 'Z' | date :'medium'}}</td>

Upvotes: 1

Views: 158

Answers (1)

ForestG
ForestG

Reputation: 18095

You can use a localized date pipe for that.

{{ value_expression | date [ : format [ : timezone [ : locale ] ] ] }}

Please check the i18n guide of the official Angular documentation here for more info: https://angular.io/guide/i18n-common-format-data-locale

Upvotes: 1

Related Questions