PHP Date Generator
Day
j
Day of month: 1-31
d
2-Digit Day: 01-31
S
Date suffix: st, nd, rd or th.
D
Abbrev. Weekday: Mon-Sun
l
Weekday: Monday-Sunday
w
Weekday Number: 0(Sunday)-6(Sat)
N
ISO-8601 Weekday Number: 1(Mon)-7(Sun) (PHP 5)
z
Day of the year: 0-365
Week
W
Week number of the year (0-52)
Month
n
Month Number: 1-12
m
2-Digit Month: 01-12
M
Short Month: Jan-Dec
F
Month: January-December
t
Total Days in Month: 28-31
Year
Y
4-Digit Year: 1999 or 2003
y
Examples: 99 or 03
L
Leap Year Boolean: In Leap Year = 1, Otherwise 0
o
Special 4-digit year based on week (PHP 5)
Time
g
Hour(12): 1 - 12
G
Hour(24): 0 - 23
h
2-Digit Hour(12): 01 - 12
H
2-Digit Hour(24): 00 - 23
a
am or pm
A
AM or PM
i
Minutes: 00 - 59
s
Seconds: 00 - 59
B
Swatch Internet time: 000 - 999
Time Zone
e
Timezone identifier: UTC, GMT, Atlantic/Azores (PHP 5)
I
Daylight Saving Time = 1, Otherwise 0.
O
Difference to Greenwich time, Example: +0200
P
Difference to Greenwich time with colon, Example: +02:00 (PHP 5)
T
Timezone abbreviation, Example: EST, MDT
Z
Timezone offset in seconds
Full Date/Time
c
ISO 8601 date (PHP 5)
r
RFC 2822 formatted date
U
Seconds since the Unix Epoch
Format:
Date:
Current Date/Time
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
,
12am
1am
2am
3am
4am
5am
6am
7am
8am
9am
10am
11am
12pm
1pm
2pm
3pm
4pm
5pm
6pm
7pm
8pm
9pm
10pm
11pm
:
00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
:
00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
PHP Date Code:
date( 'F jS, Y g:i:s a' )
Result:
January 28th, 2012 7:31:02 am
January
F
28
j
th
S
,
,
2012
Y
7
g
:
:
31
i
:
:
02
s
am
a
Click the formatting character above to add it to your date format at right.
Created by
Ben Brandt
, May 2007 Last Update: May 30th, 2007 Running PHP Version 4.4.9