Hi I want to change date format according to the choosed language, I use ng2-translate and this is my working code but it is static:
<span> {{product[col.field] | date : 'dd-MM-yyyy' >}} </span>
I want to have a format date in a current language, something like this:
<span> {{product[col.field] | date : 'DATE.PIPE' | translate >}} </span>
where in the en.json I have"DATE": { "PIPE": "MM-dd-yyyy"
and in it.json I have "DATE": { "PIPE": "dd-MM-yyyy"
Is it possible?
or is there a way to change format date programmatically?