added docs to some functions in utils.ts
This commit is contained in:
parent
7568484034
commit
1d62e85925
@ -51,6 +51,10 @@ export const oddiakritikovat = (a: string) => {
|
||||
.replace(/[ŹŻŽ]/g, "Z");
|
||||
};
|
||||
|
||||
/**
|
||||
* returns relative time in format `x hodin x minut a x se kund`
|
||||
* @param cas Number of seconds to convert
|
||||
*/
|
||||
export const formatCas = (cas: number) => {
|
||||
const h = Math.floor(cas / 3600);
|
||||
const m = Math.floor(cas % 3600 / 60);
|
||||
@ -165,6 +169,10 @@ export function loadEnv() {
|
||||
process.env = { ...process.env, ...require("../../config.json") };
|
||||
}
|
||||
|
||||
export const formatter = new Intl.DateTimeFormat("cs", { day: "numeric", month: "short", hour: "numeric", minute: "numeric", second: "numeric" });
|
||||
/**
|
||||
* Returns absolute date in format `d. m. h:mm:ss`
|
||||
* @param date Date object to convert
|
||||
*/
|
||||
export const formatter = new Intl.DateTimeFormat("cs", { day: "numeric", month: "short", hour: "numeric", minute: "numeric", second: "numeric" }).format;
|
||||
|
||||
export const ping = /^<@!?\d+>$/;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user