MCPcopy
hub / github.com/chrisdiana/cms.js / formatDate

Function formatDate

src/cms.js:284–289  ·  view source on GitHub ↗

* Formats date string to d/m/yyyy. * @param {string} dateString - Date string to convert. * @returns {string} Formatted date string

(dateString)

Source from the content-addressed store, hash-verified

282 * @returns {string} Formatted date string
283 */
284 function formatDate(dateString) {
285 var date = new Date(dateString);
286 date.setDate(date.getDate() + 1);
287 return [date.getDate(),
288 (date.getMonth() + 1),date.getFullYear()].join('/');
289 }
290
291 /**
292 * Creates message container element

Callers 1

CMSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected