Display time as “12:00 noon” instead of “12:00 pm”

We display event dates/times via WordPress date and time functions in am/pm time (12 hour, not 24 hour). For any times that are noon – i.e. “12:00 pm” – we’d like to display “12:00 noon” instead.

And we’d also like to display “12:00 midnight” instead of “12:00 am”.

This is to avoid confusion (we run online events around the world at different times so there is room for this type of confusion).

All other times of the day can keep their am/pm, it’s just these two exact times that we’re seeking to change.