MCPcopy Index your code
hub / github.com/codemistic/Web-Development / getDate

Function getDate

Awasar/app.js:85–95  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

83);
84
85function getDate(s) {
86 let monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
87
88 let year = s.substr(0, 4);
89
90 let monthIndex = Number(s.substr(5, 2)) - 1;
91 let monthName = monthNames[monthIndex];
92
93 let day = s.substr(8, 2);
94 return `${day}-${monthName}-${year}`;
95}
96
97
98app.get("/", (req, res) => {

Callers 1

app.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected