为什么 i 在 Ymd H:i:s 时间格式中代表分钟?
这是一个非常简单的问题,但我通过各种搜索都找不到答案。当我们在 PHP 中有像 Ymd H:i:s 这样的时间格式时,很容易理解:
Y = years
m = months
d = days
H = hours
s = seconds
但是为什么分钟用“i”表示呢?换句话说,这个命名约定从何而来?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
他们无法使用
m
或m
几分钟,因为它们已经用于本月。m
是一个数字月,m
是月份的缩写。因此,他们必须使用尚未分配的其他字母。我假设他们选择了
i
,因为这是minute
的第二个字母。They couldn't use
m
orM
for minutes, because they were already used for the month.m
is a numeric month, andM
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 ofminute
.