fixed time ago calculator

This commit is contained in:
flash 2016-12-12 21:47:21 +01:00
parent e0d793a4a3
commit c393368c4e

View file

@ -22,7 +22,7 @@ namespace Sakura
} }
public static Parse(date: Date, append: string = ' ago', none: string = 'Just now'): string { public static Parse(date: Date, append: string = ' ago', none: string = 'Just now'): string {
var time: number = (Date.now() - date.getTime()) / 1000; var time: number = (date.getTime() - Date.now()) / 1000;
if (time < 1) { if (time < 1) {
return none; return none;