fixed time ago calculator
This commit is contained in:
parent
e0d793a4a3
commit
c393368c4e
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Reference in a new issue