Date Members
- $qaDate['seconds'] = 31
- $qaDate['minutes'] = 31
- $qaDate['hours'] = 5
- $qaDate['mday'] = 4
- $qaDate['wday'] = 6
- $qaDate['mon'] = 5
- $qaDate['year'] = 2024
- $qaDate['yday'] = 124
- $qaDate['weekday'] = Saturday
- $qaDate['month'] = May
- $qaDate['0'] = 1714818691
Format Options
- date(
a
) = am - Lowercase am or pm
- date(
A
) = AM - Uppercase AM or PM
- date(
B
) = 480 - Swatch internet time (000 to 999)
- date(
c
) = 2024-05-04T05:31:31-05:00 - The ISO-8601 date (e.g. 2022-10-29T16:42:24-05:00)
- date(
d
) = 04 - The day of the month (01 to 31)
- date(
D
) = Sat - Thrree letter representation of the day of the week (e.g. Sat)
- date(
e
) = America/Chicago - The timezone identifier (e.g. America/Chicago)
- date(
F
) = May - The name of the month (e.g. October)
- date(
g
) = 5 - 12-hour format of an hour (1 to 12)
- date(
G
) = 5 - 24-hour format of an hour (0 to 23)
- date(
h
) = 05 - 12-hour format of an hour (01 to 12)
- date(
H
) = 05 - 24-hour format of an hour (00 to 23)
- date(
i
) = 31 - Minutes with leading zeros (00 to 59)
- date(
I
) = 1 - Daylights Savings Time (1 = Daylight Savings Time, 0 = Standard Time)
- date(
j
) = 4 - The day of the month without leading zeros (1 to 31)
- date(
l
) = Saturday - The name of the of a day of the week
- date(
L
) = 1 - Leap year (1 if it is a leap year, 0 otherwise)
- date(
m
) = 05 - Two digit month number with a leading zero (from 01 to 12)
- date(
M
) = May - Abbreviation of the month name (three letters)
- date(
n
) = 5 - A numeric representation of a month, without leading zeros (1 to 12)
- date(
N
) = 6 - The ISO-8601 numeric representation of a day (1 for Monday, 7 for Sunday)
- date(
o
) = 2024 - The ISO-8601 year number
- date(
O
) = -0500 - Difference to Greenwich time (GMT) in hours (Example: +0100)
- date(
p
) = p - Difference to Greenwich time (GMT) in hours:minutes (added in PHP 5.1.3)
- date(
P
) = -05:00 - Difference to Greenwich time (GMT) in hours:minutes (added in PHP 5.1.3)
- date(
o
) = 2024 - The ISO-8601 year number
- date(
O
) = -0500 - Difference to Greenwich time (GMT) in hours (Example: +0100)
- date(
r
) = Sat, 04 May 2024 05:31:31 -0500 - The RFC 2822 formatted date (e.g. Fri, 12 Apr 2013 12:01:05 +0200)
- date(
s
) = 31 - Seconds, with leading zeros (00 to 59)
- date(
S
) = th - The English ordinal suffix for the day of the month (2 characters st, nd, rd or th. Works well with j)
- date(
t
) = 31 - The number of days in the given month
- date(
T
) = CDT - Timezone abbreviations (Examples: EST, MDT)
- date(
u
) = 000000 - Microseconds (added in PHP 5.2.2)
- date(
U
) = 1714818691 - The seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)
- date(
v
) = 000 ???
- date(
w
) = 6 - A numeric representation of the day (0 for Sunday, 6 for Saturday)
- date(
W
) = 18 - The ISO-8601 week number of year (weeks starting on Monday)
- date(
y
) = 24 - A two digit representation of a year
- date(
Y
) = 2024 - A four digit representation of a year
- date(
z
) = 124 - The day of the year (from 0 through 365)
- date(
Z
) = -18000 - Timezone offset in seconds. The offset for timezones west of UTC is negative (-43200 to 50400)
Standard Formats
- date(DATE_ATOM) = 2024-05-04T05:31:31-05:00 - Atom
- date(DATE_COOKIE) = Saturday, 04-May-2024 05:31:31 CDT - HTTP Cookies
- date(DATE_ISO8601) = 2024-05-04T05:31:31-0500 - ISO-8601
- date(DATE_RFC822) = Sat, 04 May 24 05:31:31 -0500 - RFC 822
- date(DATE_RFC850) = Saturday, 04-May-24 05:31:31 CDT - RFC 850
- date(DATE_RFC1036) = Sat, 04 May 24 05:31:31 -0500 - RFC 1036
- date(DATE_RFC1123) = Sat, 04 May 2024 05:31:31 -0500 - RFC 1123
- date(DATE_RFC2822) = Sat, 04 May 2024 05:31:31 -0500 - RFC 2822
- date(DATE_RFC3339) = 2024-05-04T05:31:31-05:00 - Same as DATE_ATOM
- date(DATE_RSS) = Sat, 04 May 2024 05:31:31 -0500 - RSS
- date(DATE_W3C) = 2024-05-04T05:31:31-05:00 - World Wide Web Consortium
Example Format Usages
- date(
l jS F Y g:i:s a
) = Saturday 4th May 2024 5:31:31 am
- Saturday the 4th of May 2024 at 5:31:31 am
- date(
F jS, Y
, mktime(0,0,0,12,25,1054)) = December 25th, 1054
- date(DATE_ATOM, $qaDate[0]) = 2024-05-04T05:31:31-05:00