The problem is as follows: current time changes constantly, each mome
today: number = Date.now();
constructor() {
setInterval(() => {this.today = Date.now()}, 1);
}
If you want to format this on html page, use it like this:
{{today | date:'fullDate'}} {{today | date:'h:mm:ss a'}}
I'm adding one more point, which I was finding and could come closer to my solution because of this answer, so for another one who's seeking a similar thing, I'm adding this too :)
If you want to get [Year: Month :date :hours: minutes with am/pm ] format with all numbers (ex : 12 instead of the string "December"), simply use the following
{{today | date:'y:M:d:h:mm a'}}