Home > Back-end >  Why does i stand for minutes in the Y-m-d H:i:s time format?
Why does i stand for minutes in the Y-m-d H:i:s time format?

Time:04-07

This is a pretty simple question, but I cound't find an answer anywhere with various searches. When we have a time format in PHP like Y-m-d H:i:s it's very easy to understand that:

Y = years
m = months
d = days
H = hours
s = seconds

But why are minutes represented with "i"? In other words, where does this naming convention come from?

CodePudding user response:

They couldn't use m or M for minutes, because they were already used for the month. m is a numeric month, and M is the month abbreviation.

So they had to use a different letter that's not already assigned. I assume they chose i because it's the second letter of minute.

  • Related