add embed for leaderboard
All checks were successful
deploy / deploy (push) Successful in 54s

This commit is contained in:
Lee
2023-10-28 18:08:01 +01:00
parent b9fd569196
commit fb6658eec5
2 changed files with 39 additions and 1 deletions

View File

@ -59,3 +59,18 @@ export function formatMsToTime(ms: number) {
return hoursStr + minutesStr + secondsStr;
}
/**
* Formats a date to a human readable format
* eg: January 1, 2021
*
* @param date the date to format
* @returns the formatted date
*/
export function formatTime(date: Date) {
return date.toLocaleTimeString("en-US", {
day: "numeric",
month: "long",
year: "numeric",
});
}