chore: merge dev to main #177
3 changed files with 4 additions and 7 deletions
|
@ -131,9 +131,9 @@ export default async (message: Message, client: Client) => {
|
|||
}
|
||||
|
||||
// Footer
|
||||
let footer = `Posté le ${showDate(client.config.default_lang, loc, quoted_post!.createdAt)}`;
|
||||
let footer = `Posté le ${showDate(loc, quoted_post!.createdAt)}`;
|
||||
if (quoted_post?.editedAt) {
|
||||
footer += ` et modifié le ${showDate(client.config.default_lang, loc, quoted_post.editedAt)}`;
|
||||
footer += ` et modifié le ${showDate(loc, quoted_post.editedAt)}`;
|
||||
}
|
||||
|
||||
let author = "Auteur";
|
||||
|
@ -141,7 +141,6 @@ export default async (message: Message, client: Client) => {
|
|||
author += " & Citateur";
|
||||
} else {
|
||||
footer += `\nCité par ${userWithNickname(message.member!) ?? "?"} le ${showDate(
|
||||
client.config.default_lang,
|
||||
loc,
|
||||
message.createdAt,
|
||||
)}`;
|
||||
|
|
|
@ -414,7 +414,6 @@ export const embedListReminders = async (
|
|||
const expiration = `${loc.get("c_reminder8")} ${timeDeltaToString(remind.expiration_date)}`;
|
||||
embed.addFields({
|
||||
name: `#${remind.id} • ${loc.get("c_reminder9")} ${showDate(
|
||||
local,
|
||||
loc,
|
||||
new Date(Number(remind.creation_date)),
|
||||
)}\n${expiration}`,
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
* @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")} `);
|
||||
};
|
||||
export const showDate = (locale: Map<string, unknown>, date: Date) =>
|
||||
`${date.toDateString()} ${locale.get("u_time_at")} ${date.toTimeString().split(" ")[0]}`;
|
||||
|
||||
enum TimeSecond {
|
||||
Year = 31536000,
|
||||
|
|
Loading…
Reference in a new issue