Skip to content

Commit deabf24

Browse files
committed
Fix #187
1 parent aa3ac00 commit deabf24

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/BaseLogger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ export class BaseLogger<LogObj> {
294294
} else {
295295
placeholderValues["yyyy"] = logObjMeta?.date?.getFullYear() ?? "----";
296296
placeholderValues["mm"] = formatNumberAddZeros(logObjMeta?.date?.getMonth(), 2, 1);
297-
placeholderValues["dd"] = formatNumberAddZeros(logObjMeta?.date?.getDate(), 2, 1);
297+
placeholderValues["dd"] = formatNumberAddZeros(logObjMeta?.date?.getDate(), 2);
298298
placeholderValues["hh"] = formatNumberAddZeros(logObjMeta?.date?.getHours(), 2);
299299
placeholderValues["MM"] = formatNumberAddZeros(logObjMeta?.date?.getMinutes(), 2);
300300
placeholderValues["ss"] = formatNumberAddZeros(logObjMeta?.date?.getSeconds(), 2);

tests/Nodejs/7_pretty_Settings.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ describe("Pretty: Settings", () => {
216216
const dateMonth = new Date().getMonth();
217217
const mm = dateMonth == null ? "--" : dateMonth < 9 ? "0" + (dateMonth + 1) : dateMonth + 1;
218218
const dateDay = new Date().getDate();
219-
const dd = dateDay == null ? "--" : dateDay < 9 ? "0" + (dateDay + 1) : dateDay + 1;
219+
const dd = dateDay == null ? "--" : dateDay < 10 ? "0" + dateDay : dateDay;
220220
const dateHours = new Date().getHours();
221221
const hh = dateHours == null ? "--" : dateHours < 10 ? "0" + dateHours : dateHours;
222222
const dateMinutes = new Date().getMinutes();

0 commit comments

Comments
 (0)