Jump to content

why 'i' means minuites in PHP date format?


Go to solution Solved by kicken,

Recommended Posts

Sorry for silly question, I tried to google it, but can't find an answer :D

 

Why there:

date('d-m-Y H:i:s')

'i' means minutes? It has to be 'm', but there is 'month' already, ok.. What does acronym 'i' stands for there?  :DD Which word hides behind this glyph? 

 

Thanks.

Edited by tangar
Link to comment
https://forums.phpfreaks.com/topic/305482-why-i-means-minuites-in-php-date-format/
Share on other sites

'i' is the ninth letter and the third vowel in the ISO basic Latin alphabet. So that gives you 93. You then take the last number (3) and replicate it giving you 33. When you subtract 33 from 93 that gives you 60. There are 60 seconds in a minute, so that's why seconds is 'i'.

Source: Benanamen

'i' is the ninth letter and the third vowel in the ISO basic Latin alphabet. So that gives you 93. You then take the last number (3) and replicate it giving you 33. When you subtract 33 from 93 that gives you 60. There are 60 seconds in a minute, so that's why seconds is 'i'.

Source: Benanamen

there are 60 minutes in an hour, so that's why minutes is "i".

If it makes you feel better, think of them as "inutes" :}

LOL!

 

The date format's formatting is confusing and makes no sense. In the past most devs will write a class and do stuff like $date->showMinutes(); Nowadays most people use DateTime class, but if you need to echo the date in one page, you wouldn't initialize a whole class, so date still has to be used with its crazy formatting. 

The date format's formatting is confusing and makes no sense.

 

How can you say that?

date('jS F')

is quite straightforward and intuitive :)

 

BTW, the formatting in the dateTime class is exactly the same as for date()

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.