JS: Add support for dateformat package

This commit is contained in:
Asger Feldthaus
2020-11-02 11:30:59 +00:00
parent 39c8226fba
commit 9418c6c8fe
2 changed files with 17 additions and 0 deletions

View File

@@ -14,4 +14,5 @@ function main() {
document.body.innerHTML = `Time is ${dateFnsFp.format(time)(taint)}`; // OK - time arg is safe
document.body.innerHTML = `Time is ${moment(time).format(taint)}`; // NOT OK
document.body.innerHTML = `Time is ${moment(taint).format()}`; // OK
document.body.innerHTML = `Time is ${dateformat(time, taint)}`; // NOT OK
}