This date converter function working fine on chrome but not on Firefox! any one can help figure out problem.
function converter(string) {
var d = new Date(string);
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'sep', 'Oct', 'Nov', 'Dec'];
var hour = d.getHours();
return d.getFullYear() + ' ' + months[d.getMonth()] + ' ' + d.getDate() + ' | ' + (hour % 12) + ' ' + d.getMinutes() + ':' + (hour > 11 ? 'pm' : 'am');
}
alert(converter('2013-03-10 19:43:55'))