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

Function dateToString

scripts/ufs_statistic.js:446–452  ·  view source on GitHub ↗
(date)

Source from the content-addressed store, hash-verified

444}
445
446function dateToString(date) {
447 let day = date.getDate().toString().padStart(2, "0");
448 let month = (date.getMonth() + 1).toString().padStart(2, "0");
449 let year = date.getFullYear();
450 let dateString = `${year}-${month}-${day}`;
451 return dateString;
452}
453
454function getPath(date) {
455 return `/log/${dateToString(date)}`;

Callers 1

getPathFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected