Merge pull request #36 from jtagcat/patch-2
greeter: add %isodate (2021-09-17)
This commit is contained in:
commit
8bf68f2f86
1 changed files with 3 additions and 1 deletions
|
@ -98,13 +98,15 @@ export const getDateString = (
|
||||||
let month = months[currentDate.getUTCMonth()];
|
let month = months[currentDate.getUTCMonth()];
|
||||||
let extension = getExtension(day);
|
let extension = getExtension(day);
|
||||||
let year = currentDate.getFullYear();
|
let year = currentDate.getFullYear();
|
||||||
|
let isodate = currentDate.toISOString().slice(0,10);
|
||||||
|
|
||||||
return format
|
return format
|
||||||
.replace("%wd", weekday)
|
.replace("%wd", weekday)
|
||||||
.replace("%d", day.toString())
|
.replace("%d", day.toString())
|
||||||
.replace("%e", extension)
|
.replace("%e", extension)
|
||||||
.replace("%m", month)
|
.replace("%m", month)
|
||||||
.replace("%y", year.toString());
|
.replace("%y", year.toString())
|
||||||
|
.replace("%isodate", isodate);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue