wordpress date format Cheet Sheet  [ 497 views ]

Goal: wordpress date formatting reference


get_the_time( 'j M Y'); --> Friday, September 24, 2004

Day of Month

d  Numeric, with leading zeros                  01–31
j  Numeric, without leading zeros               1–31
S  The English suffix for the day of the month  st, nd or th in the 1st, 2nd or 15th.


l  Full name  (lowercase 'L')                   Sunday – Saturday
D  Three letter name                            Mon – Sun


m  Numeric, with leading zeros                  01–12
n  Numeric, without leading zeros               1–12
F  Textual full                                 January – December
M  Textual three letters                        Jan - Dec


Y  Numeric, 4 digits                            Eg., 1999, 2003
y  Numeric, 2 digits                            Eg., 99, 03


a  Lowercase                                    am, pm
A  Uppercase                                    AM, PM
g  Hour, 12-hour, without leading zeros         1–12
h  Hour, 12-hour, with leading zeros            01–12
G  Hour, 24-hour, without leading zeros         0-23
H  Hour, 24-hour, with leading zeros            00-23
i  Minutes, with leading zeros                  00-59
s  Seconds, with leading zeros                  00-59
T  Timezone abbreviation                        Eg., EST, MDT ...

Full Date/Time

c  ISO 8601                                     2004-02-12T15:19:21+00:00
r  RFC 2822                                     Thu, 21 Dec 2000 16:01:07 +0200

see also: http://codex.wordpress.org/Formatting_Date_and_Time

#sidebar a { color:#fff; } #sidebar ul ul li { color: #DEF585; } #sidebar h2 { color: #fff; } #sidebar ul p, #sidebar ul select { color: #BEDDBE; } #backfly { background: url(images/golfBallWallPaper.jpg) left bottom fixed repeat-x #65a51d; }