I'm seeing behavior on Chrome where the return value for a 12:00 pm time formatted with hours12 set to true comes out as 0 pm. Shouldn't it be 12? If not, what's the proper way to display a 12 hour clock? Note that I'm constrained to using ES5.
The following in Chrome prints 0 pm:
var foo = new Date(2020, 0, 1, 12, 0, 0)
var bar = new Intl.DateTimeFormat("en-GB", {hour12: true, hour: "numeric"}).format(foo)
console.log(bar)
Note that the value of bar is '0 pm'. Other languages besides en-GB exhibit this behavior. The same code run with en-US, though, gives me '12 PM'. Is it that the British and others actually use '0 pm' to indicate noon? Is this a bug in Chrome? It does not happen in FF or IE.
Thanks in advance for any input.