Key |
To Get______________________ |
Format______________________ |
Returns:____________________ |
r |
Date-time (RFC 2822) |
date_format($dto_now,'r') |
Mon, 10 Mar 2025 03:50:10 -0700 |
c |
Date-time (ISO 8601) |
date_format($dto_now,'c') |
2025-03-10T03:50:10-07:00 |
O |
Date-time (GMT offset) |
date_format($dto_now,'O') |
-0700 |
P |
Date-time (offset hours:minutes) |
date_format($dto_now,'P') |
-07:00 |
U |
Date-time Unix Epoch |
date_format($dto_now,'U') |
1741603810 |
e |
timezone identifier |
date_format($dto_now,'e') |
America/Los_Angeles |
T |
Time Zone in 3 |
date_format($dto_now,'T') |
PDT |
I |
Daylight Savings? |
date_format($dto_now,'I') |
1 |
L |
Is it a Leap-Year? |
date_format($dto_now,'L') |
0 |
- |
--Mix & Match: |
M/d/Y |
Date (Month/Day/Year) |
$dto_now->format('M/d/Y') |
Mar/10/2025 |
d-m-Y |
Date (Day-Month-Year) |
$dto_now->format('d-m-Y') |
10-03-2025 |
y-m-d |
Date (Year-Month-Date) |
$dto_now->format('y-m-d') |
25-03-10 |
Y-m-d H:i |
Date and Time |
$dto_now->format('Y-m-d H:i') |
2025-03-10 03:50 |
- |
--Each Part: |
Y |
4 digit Year |
$dto_now->format('Y') |
2025 |
y |
2 digit Year |
$dto_now->format('y') |
25 |
F |
Month-Full Name |
$dto_now->format('F') |
Mar |
M |
Month-3 Letters |
$dto_now->format('M') |
Mar |
m |
Month-Number 01-12 |
$dto_now->format('m') |
03 |
n |
Month-Number 1-12 |
$dto_now->format('n') |
3 |
l |
Day-of-Week |
$dto_now->format('l') |
Monday |
D |
Day-of-Week in 3 |
$dto_now->format('D') |
Mon |
w |
day 0=Sunday, 6=Saturday |
$dto_now->format('w') |
1 |
z |
day of year 0-366 |
$dto_now->format('z') |
68 |
d |
day number 01-31 |
$dto_now->format('d') |
10 |
j |
day number 1-31 |
$dto_now->format('j') |
10 |
H |
Hour - 24 |
$dto_now->format('H') |
03 |
h |
hour - 12 |
$dto_now->format('h') |
03 |
A |
AM PM |
$dto_now->format('A') |
AM |
a |
am pm |
$dto_now->format('a') |
am |
i |
Minute |
$dto_now->format('i') |
50 |
s |
Second |
$dto_now->format('s') |
10 |
u |
Microsecond |
$dto_now->format('u') |
597873 |