new Date().toISOString()
'2022-10-11T16:22:51.161Z'
new Date().toJSON()
'2022-10-11T16:22:51.161Z'
new Date().toDateString()
'Tue Oct 11 2022'
new Date().toGMTString()
'Tue, 11 Oct 2022 16:22:51 GMT'
new Date().toUTCString()
'Tue, 11 Oct 2022 16:22:51 GMT'
new Date().toTimeString()
'21:52:51 GMT+0530 (India Standard Time)'
new Date().toString()
'Tue Oct 11 2022 21:52:51 GMT+0530 (India Standard Time)'
new Date().toLocaleDateString()
'11/10/2022'
new Date().toLocaleTimeString()
'21:52:51'
new Date().toLocaleString()
'11/10/2022, 21:52:51'