Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

tolocale string no seconds

let d = new Date(2022, 2, 21, 7, 45, 0);
let s = d.toLocaleString([], { dateStyle: 'short', timeStyle: 'short' });
console.log(s);
// '2/21/22, 7:45 AM'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #tolocale #string #seconds
ADD COMMENT
Topic
Name
1+4 =