17 lines
343 B
TypeScript
17 lines
343 B
TypeScript
|
/**
|
||
|
* Parsed string adapted with TZ (locales) and format for the specified lang.
|
||
|
* @param tz Lang
|
||
|
* @param locale Locales
|
||
|
* @param date Date
|
||
|
* @returns String
|
||
|
*/
|
||
|
export const showDate = (
|
||
|
tz: string,
|
||
|
locale: Map<string, unknown>,
|
||
|
date: Date
|
||
|
) => {
|
||
|
return date.toLocaleString(tz).replace(' ', ` ${
|
||
|
locale.get('u_time_at')
|
||
|
} `);
|
||
|
};
|