From midnight to midday (noon), times are a.m.
From midday (noon) to midnight, times are p.m.
BEFORE NOON is a.m.
AFTER NOON is p.m.
I go for an afternoon bike ride to my friend's house.
Is this a.m. or p.m.?
Afternoon is AFTER NOON, so it is p.m.