| Key | To Get______________________ | Format______________________ | Returns:____________________ |
|---|---|---|---|
| r | Date-time (RFC 2822) | date_format($tz_now,'r') | Fri, 28 Nov 2025 07:57:32 -0800 |
| c | Date-time (ISO 8601) | date_format($tz_now,'c') | 2025-11-28T07:57:32-08:00 |
| O | Date-time (GMT offset) | date_format($tz_now,'O') | -0800 |
| P | Date-time (offset hours:minutes) | date_format($tz_now,'P') | -08:00 |
| U | Date-time Unix Epoch | date_format($tz_now,'U') | 1764345452 |
| e | timezone identifier | date_format($tz_now,'e') | America/Los_Angeles |
| T | Time Zone in 3 | date_format($tz_now,'T') | PST |
| I | Daylight Savings? | date_format($tz_now,'I') | 0 |
| L | Is it a Leap-Year? | date_format($tz_now,'L') | 0 |
| - | |||
| --Mix & Match: | |||
| M/d/Y | Date (Month/Day/Year) | $tz_now->format('M/d/Y') | Nov/28/2025 |
| d-m-Y | Date (Day-Month-Year) | $tz_now->format('d-m-Y') | 28-11-2025 |
| y-m-d | Date (Year-Month-Date) | $tz_now->format('y-m-d') | 25-11-28 |
| Y-m-d H:i | Date and Time | $tz_now->format('Y-m-d H:i') | 2025-11-28 07:57 |
| - | |||
| --Each Part: | |||
| Y | 4 digit Year | $tz_now->format('Y') | 2025 |
| y | 2 digit Year | $tz_now->format('y') | 25 |
| F | Month-Full Name | $tz_now->format('F') | November |
| M | Month-3 Letters | $tz_now->format('M') | Nov |
| m | Month-Number 01-12 | $tz_now->format('m') | 11 |
| n | Month-Number 1-12 | $tz_now->format('n') | 11 |
| l | Day-of-Week | $tz_now->format('l') | Friday |
| D | Day-of-Week in 3 | $tz_now->format('D') | Fri |
| w | day 0=Sunday, 6=Saturday | $tz_now->format('w') | 5 |
| z | day of year 0-366 | $tz_now->format('z') | 331 |
| d | day number 01-31 | $tz_now->format('d') | 28 |
| j | day number 1-31 | $tz_now->format('j') | 28 |
| H | Hour - 24 | $tz_now->format('H') | 07 |
| h | hour - 12 | $tz_now->format('h') | 07 |
| A | AM PM | $tz_now->format('A') | AM |
| a | am pm | $tz_now->format('a') | am |
| i | Minute | $tz_now->format('i') | 57 |
| s | Second | $tz_now->format('s') | 32 |
| u | Microsecond | $tz_now->format('u') | 597122 |