Styled byLS Loader
Locale => en, es, de, ru, tr
<div ngFor="let date of dates; let index=index;">
<span class="Badge Bg-light" TimeAgo [Date]="date" [Live]="index==0" [Locale]="'en'"></span>
</div>
const time = new Date().getTime();
this.dates = [
new Date(),
new Date(time - this.minuteInMs * 45), // 45min ago
new Date(time - this.hourInMs), // 1H ago
new Date(time - this.hourInMs * 24), // 24H ago
new Date(time - this.dayInMs * 21), // 3W ago
new Date(time - this.monthInMs * 6), // 6M ago
new Date(time - this.yearInMs * 2), // 2Y ago
new Date(time + this.hourInMs * 8), // 8H later
];
<span class="Badge Bg-info ME-2">{/{dates[0] | TimeAgo:true:''}/}</span>
<span class="Badge Bg-info ME-2">{/{dates[0] | TimeAgo:true:'tr'}/}</span>
<span class="Badge Bg-light ME-2" *ngFor="let date of dates; let index=index;">{/{date | TimeAgo}/}</span>
<Countdown ClassName="Border Shadow" [Date]="countdown[0]"></Countdown>
<Countdown ClassName="Fg-yellow" [Date]="countdown[1]"></Countdown>
<Countdown ClassName="Fg-green" [Date]="countdown[2]"></Countdown>
Now = Date.now();
countdown = [
new Date(new Date().getTime() + this.minuteInMs * 45), // 45min later
new Date(new Date().getTime() + this.hourInMs), // 1H later
new Date(new Date().getTime() + this.hourInMs * 24), // 24H later
];
<Stopwatch></Stopwatch>
<Chronometer ClassName="Fg-orange"></Chronometer>