The Meaning of Midnight

We had a rather long argument at work yesterday regarding the meaning of "midnight".  I took the argument onto english.stackexchange.com and then Facebook after work, and 35 comments and some research later, I think I've decided on an answer.

First, some context.

Like many IT companies, we have a moratorium that runs over Christmas.  That means no changes to any production systems over the break.  It's a sensible step given the large number of people on holiday.  The communication (at least internally) was that the moratorium began at "midnight on the 9th of December". Here's where the problem starts.

Different Interpretations

It turned out that there were two different ideas about what "midnight on the 9th" meant.  The different interpretations, for the most part, were split between technical staff and less technical staff.  The technical staff - programmers and sysadmins - tended to interpret "midnight on the 9th" as 12am on the morning of the 9th of December.  The less technical staff - managers and level 1 support - tended to interpret "midnight on the 9th" as midnight at the end of the 9th of December.

If you're still reading, I'm sure you're very strongly on one side of the fence and can't understand how anyone could have a different interpretation.  That was what happened to us.  Some people got quite fired up about it.

It's totally first thing in the morning, idiot!

The argument here is that midnight is written as 12:00am or, in 24 hour time, 00:00.  If it's AM or zero, then surely it's first thing in the morning.  How could it be anything else?!

No you moron, it's in the middle of the night at the end of the day!

The alternative argument is that nobody would think "midnight tonight" was actually tomorrow, or that there is no "midnight tonight".  It's in the middle of the night, and the night belongs to the day before. Geez!

My original position

Originally, I was very much in camp first-thing-in-the-morning.  That's probably because nobody in my experience has ever referred to midnight as 24:00.  Indeed, no programming language I've ever encountered has defined midnight as anything other than the first moment of time available for a day.  Having said that, I could appreciate that phrases like "midnight tonight" were fairly unambiguous even if they didn't agree with my technical definition.

So I decided to read more.

Most dictionaries I referenced very unhelpfully referred to midnight as, "the middle of the night", or "12 o'clock at night".  That really didn't help me prove that I was right and everyone who disagreed with me were wrong.

Everybody's wrong!

It seemed that no organisation really wanted to decide which day midnight belonged to.  NIST even recommended avoiding using 12am or 12pm because it's ambiguous.  They actually have a good explanation of why on that site.

And that seems to be the answer.  Midnight does not belong to either of the days it splits.  Midnight really acts as a separator.  It's infinitely small, and it doesn't actually exist in either day.  Technically, it's not a time of the day at all, but the point at which the day changes.

It helps to compare it to "midday".  Nobody vehemently claims that midday belongs to the morning or the afternoon.  It's generally agreed that it's the point between them.  Of course you don't get the same problems with midday because "midday on the 9th" is unambiguous; there's only one time it can be.

Ok, so not everybody is wrong

Ultimately it comes down to convention, and the convention seems to be that midnight is at the end of a day.  It's not technically correct, but more people understand it that way than the alternatives.

Of course that would mean that I was wrong.

It's a stupid argument anyway.

Damian Brady

I'm an Australian developer, speaker, and author specialising in DevOps, MLOps, developer process, and software architecture. I love Azure DevOps, GitHub Actions, and reducing process waste.

--