can't use amLocale with amLocal
ahmedkhairydev opened this issue · 2 comments
ahmedkhairydev commented
Description of the Issue and Steps to Reproduce:
Did you search for duplicate issue? [Yes / No]
Yes.
I can't use amLocale with amLocal. amLocal doesn't work correctly.
amLocal working correctly when using it without amLocale.
when using amLocal the time becomes to be in Arabic character
<span class="time">{{ row.dateModified | amLocale: 'en' | amFromUtc | amLocal | amDateFormat: 'hh:mm a' }}</span>
Version
"moment": "^2.24.0",
"ngx-moment": "^3.5.0",
"moment-hijri": "^2.1.2"
Environment:
- Angular version
sergey-morenets commented
Just tested with ngx-moment 5.0. Locale was chosen correctly.
ahmedkhairydev commented
Thanks for your support
The issue is resolved but the sequence of the pipes should be correct! 😂
Right Way
<span class="time"> {{ row.dateModified | amFromUtc | amLocal | amLocale: 'en' | amDateFormat: 'hh:mm a' }} </span>
Wrong Way
<span class="time"> {{ row.dateModified | amLocale: 'en' | amFromUtc | amLocal | amDateFormat: 'hh:mm a' }} </span>