how to return formatted date js code example
Example 1: js date now format
new Date().toJSON()
// "2021-01-12T01:06:54.747Z"
Example 2: Format Date Javascript
const dateStr = '2020-06-21T10:15:00Z',
[yyyy,mm,dd,hh,mi] = dateStr.split(/[/:\-T]/)
console.log(`${dd}-${mm}-${yyyy} ${hh}:${mi}`)