JavaScript function to get uppercase Ante meridiem and Post meridiem