Fix time-span calculation. (#635)
This commit is contained in:
parent
21db5a4102
commit
03ce592ab0
@ -52,7 +52,7 @@ export class TimeSpanComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
calculate() {
|
calculate() {
|
||||||
const seconds = Math.floor((+new Date() - +new Date(this.time * 1000)) / 1000);
|
const seconds = Math.floor(this.time);
|
||||||
if (seconds < 60) {
|
if (seconds < 60) {
|
||||||
return $localize`:@@date-base.just-now:Just now`;
|
return $localize`:@@date-base.just-now:Just now`;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user