Added Helper Functions for events.deleteDate. Its stored as integer for unixtime.
This commit is contained in:
1 parent
76dfde05f7
commit
d5a1bc9fa7
1 file changed
+4
-1
+4
-1
@@ -38,4 +38,7 @@ export function getTsNow() {
|
|||||||
seconds: now.getSeconds()
|
seconds: now.getSeconds()
|
||||||
}
|
}
|
||||||
return rtn;
|
return rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function unixToDate( unix_timestamp: number ) { return new Date(unix_timestamp * 1000) }
|
||||||
|
export function dateToUnix( date: Date ) { return Math.round( date.getTime()/1000 ) }
|
||||||
Reference in new issue
Block a user