Page 1 of 1 [ 3 posts ] 

LonelyJar
Veteran
Veteran

User avatar

Joined: 15 Sep 2013
Gender: Male
Posts: 2,073

16 Jun 2014, 4:19 am

Could someone please explain what "D M d, Y g:i a" means?



Cornflake
Administrator
Administrator

User avatar

Joined: 30 Oct 2010
Gender: Male
Posts: 65,674
Location: Over there

16 Jun 2014, 4:42 am

Next to that option in your profile is the text:
"The syntax used is identical to the PHP date() function" and there, as well as here, the underlined "date()" part is a link to an explanation of the codes used.

So, "D M d, Y g:i a" means:
D - textual representation of a day, three letters (Mon through Sun)
M - short textual representation of a month, three letters (Jan through Dec)
d - day of the month, 2 digits with leading zeros (01 to 31)
, - a literal comma
Y - full numeric representation of a year, 4 digits
g - 12-hour format of an hour without leading zeros
: - a literal colon
i - minutes with leading zeros
a - lower-case am or pm as appropriate
The spaces between these symbols are also used literally.

Therefore: "Mon Jun 16, 2014 10:42 am"


_________________
Giraffe: a ruminant with a view.


LonelyJar
Veteran
Veteran

User avatar

Joined: 15 Sep 2013
Gender: Male
Posts: 2,073

16 Jun 2014, 2:34 pm

Thanks again, Cornflake!