the following regular expression is supposed to remove the "seconds" component. it works in Firefox and chrome but not IE 11 or Edge.
var retval = new Date().toLocaleTimeString();
retval = retval.replace(/(\d{1,2}:\d{2}):\d{2}/, "$1");
// this is how it should convert
"9:44:24 AM" => "9:44 AM"