Date Formats

Seeing that some dates are shown in the American format, and others are shown in the British format, I decided to try to work out the possible different options, and the codes that create these dates.

I started trying to work out this one: j F Y | g:i a

j = Numeric day eg: 1 to 31
d = Numeric day eg: 01 to 31

s = abbreviation st, nd, th etc

F = The Month in full, eg: October
M = The Month abreviated, eg: Oct

Y = 4 digit year eg 2010
y = 2 digit year eg: 10

m/j/y = Month, Date, Year in this format: mm/dd/yyyy
g:i A = the time in this format: 4:30 PM
g:i a = the time in this format: 4:30 pm
G:i = the time in this format: 16:30 (24 hour clock)

So todays date in the first code, j F Y | g:i a,  is 16 October 2010 4:35 pm

An optional code, js F Y | g:i a,  would be 16th October 2010 4:35 pm

The following is a definite work in progress, until I find the full answers.

Possible Date Setting-Formats


‘Y-m-d H:i’
‘m/d/Y – H:i’
‘d/m/Y – H:i’
‘Y/m/d – H:i’
‘d.m.Y – H:i’
‘m/d/Y – g:ia’
‘d/m/Y – g:ia’
‘Y/m/d – g:ia’
‘M j Y – H:i’
‘j M Y – H:i’
‘Y M j – H:i’
‘M j Y – g:ia’
‘j M Y – g:ia’
Y M j – g:ia’


‘D, Y-m-d H:i’
‘D, m/d/Y – H:i’
‘D, d/m/Y – H:i’
‘D, Y/m/d – H:i’
‘F j, Y – H:i’
‘j F, Y – H:i’
‘Y, F j – H:i’
‘D, m/d/Y – g:ia’
‘D, d/m/Y – g:ia’
‘D, Y/m/d – g:ia
‘F j, Y – g:ia’
‘j F Y – g:ia’
‘Y, F j – g:ia’
‘j. F Y – G:i’


‘l, F j, Y – H:i’
‘l, j F, Y – H:i’
‘l, Y, F j – H:i’
‘l, F j, Y – g:ia’
‘l, j F Y – g:ia’
‘l, Y, F j – g:ia’
‘l, j. F Y – G:i’

170.1 - 841,116
Scroll down for Comments
0 0 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x