feat: quote #42
1 changed files with 16 additions and 0 deletions
16
src/utils/time.ts
Normal file
16
src/utils/time.ts
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
/**
|
||||||
|
* Parsed string adapted with TZ (locales) and format for the specified lang.
|
||||||
|
* @param lang Lang
|
||||||
|
* @param locale Locales
|
||||||
|
* @param date Date
|
||||||
|
* @returns String
|
||||||
|
*/
|
||||||
|
export const showDate = (
|
||||||
|
lang: string,
|
||||||
|
locale: Map<string, unknown>,
|
||||||
|
date: Date
|
||||||
|
) => {
|
||||||
|
return date.toLocaleString(lang).replace(' ', ` ${
|
||||||
|
locale.get('u_time_at')
|
||||||
|
} `);
|
||||||
|
};
|
Loading…
Reference in a new issue