mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-06-21 00:55:17 +00:00
Can create a new account
This commit is contained in:
@ -6,4 +6,16 @@
|
||||
|
||||
export function time() : number {
|
||||
return Math.floor((new Date()).getTime()/1000);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the current date formatted for the "DATETIME" object of
|
||||
* a MySQL database
|
||||
*/
|
||||
export function mysql_date() : string {
|
||||
const date = new Date();
|
||||
|
||||
return date.getFullYear() + "-" + (date.getMonth()+1) + "-" + (date.getDate() + 1)
|
||||
+ " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
}
|
Reference in New Issue
Block a user