How to get date in JSON format with TypeScript

1 Answer

0 votes
const json = new Date().toJSON();

console.log(json);

 
  
  
  
/*
run:
  
"2022-03-15T07:34:02.504Z" 
  
*/

 



answered Mar 15, 2022 by avibootz
...