make timestamp with seconds

This commit is contained in:
Olivier Gagnon 2021-11-10 19:50:21 -05:00
parent 15b3a82a41
commit 1e7da4c610

@ -7,6 +7,7 @@ export function getTimestamp(): string {
const stringWidth = -2;
const formattedHours: string = `0${d.getHours()}`.slice(stringWidth);
const formattedMinutes: string = `0${d.getMinutes()}`.slice(stringWidth);
const formattedSeconds: string = `0${d.getSeconds()}`.slice(stringWidth);
return `${d.getMonth() + 1}/${d.getDate()} ${formattedHours}:${formattedMinutes}`;
return `${d.getMonth() + 1}/${d.getDate()} ${formattedHours}:${formattedMinutes}:${formattedSeconds}`;
}