MCPcopy Create free account
hub / github.com/adobe/react-spectrum / todayYMD

Function todayYMD

scripts/changelog.js:86–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84}
85
86function todayYMD() {
87 let d = new Date();
88 let y = d.getFullYear();
89 let m = String(d.getMonth() + 1).padStart(2, '0');
90 let day = String(d.getDate()).padStart(2, '0');
91 return `${y}-${m}-${day}`;
92}
93
94function prettyDate(ymd) {
95 let [y, m, d] = ymd.split('-').map(Number);

Callers 1

runFunction · 0.85

Calls 1

StringFunction · 0.85

Tested by

no test coverage detected