Answers for "all date format in j"

3

js date now format

new Date().toJSON()
// "2021-01-12T01:06:54.747Z"
Posted by: Guest on January-12-2021
1

javascript date format

const d = new Date('2010-08-05')
const ye = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(d)
const mo = new Intl.DateTimeFormat('en', { month: 'short' }).format(d)
const da = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(d)

console.log(`${da}-${mo}-${ye}`)
Posted by: Guest on May-31-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language