MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / dateToString

Function dateToString

scripts/ufs_statistic_old.js:646–652  ·  view source on GitHub ↗
(date)

Source from the content-addressed store, hash-verified

644}
645
646function dateToString(date) {
647 let day = date.getDate().toString().padStart(2, "0");
648 let month = (date.getMonth() + 1).toString().padStart(2, "0");
649 let year = date.getFullYear();
650 let dateString = `${year}-${month}-${day}`;
651 return dateString;
652}
653
654function getPath(date) {
655 return `/log/${dateToString(date)}`;

Callers 1

getPathFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected