mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-19 06:03:50 +01:00
[bug] Fixing the timestamp
getMonth() is 0-based, so changing the offset. getDay() is the day of week, not day of the month. Ensuring hours & minutes are always two digits.
This commit is contained in:
parent
fabc45f496
commit
0345daf359
@ -647,8 +647,8 @@ let Terminal = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getTimestamp: function() {
|
getTimestamp: function() {
|
||||||
let d = new Date();
|
const d = new Date();
|
||||||
return (d.getMonth() + "/" + d.getDay() + " " + d.getHours() + ":" + d.getMinutes());
|
return `${d.getMonth() + 1}/${d.getDate()} ${`0${d.getHours()}`.slice(-2)}:${`0${d.getMinutes()}`.slice(-2)}`;
|
||||||
},
|
},
|
||||||
|
|
||||||
finishAction: function(cancelled = false) {
|
finishAction: function(cancelled = false) {
|
||||||
|
Loading…
Reference in New Issue
Block a user