Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js format time

// Many options with Intl.DateTimeFormat
const formatter = new Intl.DateTimeFormat('en', {
		hour12: true,
		hour: 'numeric',
		minute: '2-digit',
		second: '2-digit'
	});
formatter.format(new Date());
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #format #time
ADD COMMENT
Topic
Name
7+8 =