mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-09 06:47:34 +01:00
make timestamp with seconds
This commit is contained in:
parent
15b3a82a41
commit
1e7da4c610
@ -7,6 +7,7 @@ export function getTimestamp(): string {
|
|||||||
const stringWidth = -2;
|
const stringWidth = -2;
|
||||||
const formattedHours: string = `0${d.getHours()}`.slice(stringWidth);
|
const formattedHours: string = `0${d.getHours()}`.slice(stringWidth);
|
||||||
const formattedMinutes: string = `0${d.getMinutes()}`.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}`;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user