0
I have a date in timestamp format and wanted to format for text in Portuguese, for example: "Wednesday, October 18th, 2017", but I put the pipe "| date:'fullDate'" and it doesn’t work. When I take the toLocaleString("pt-BR")
and return a Date in the function it returns me "Wednesday, October 18, 2017". Thank you in advance!
typescript
public dt: Date = new Date();
public getDate(): string {
return this.dt.toLocaleString("pt-BR");
}
html
<div class="data"><b>{{getDate() | date:'fullDate'}}</b></div>
Solved! Thank you very much!
– Krint