Programming
We provide developers and engineers the guides and tutorials they...
Search
We provide developers and engineers the guides and tutorials they...
Content is king. It's not just about how you're going to write, b...
Looking for an engaging connection with thousands of other people...
Look up PHP date format tokens and preview Carbon::parse($input)->format($format) live.
Tuesday 24 November 2026, 14:06
ISO 8601: 2026-11-24T14:06:23+00:00
| Token | Meaning | Example |
|---|---|---|
| Y | Four-digit year | 2026 |
| y | Two-digit year | 26 |
| F | Full month name | September |
| M | Short month name | Sep |
| m | Month, 01–12 | 09 |
| n | Month, 1–12 | 9 |
| d | Day of month, 01–31 | 23 |
| j | Day of month, 1–31 | 23 |
| D | Short weekday | Wed |
| l | Full weekday | Wednesday |
| N | ISO weekday 1–7 (Mon–Sun) | 3 |
| w | Weekday 0–6 (Sun–Sat) | 3 |
| W | ISO week number | 39 |
| z | Day of year, 0–365 | 265 |
| t | Days in the month | 30 |
| L | Leap year (1 or 0) | 0 |
| H | Hour, 00–23 | 16 |
| G | Hour, 0–23 | 16 |
| h | Hour, 01–12 | 04 |
| g | Hour, 1–12 | 4 |
| i | Minutes, 00–59 | 47 |
| s | Seconds, 00–59 | 00 |
| a | am or pm | pm |
| A | AM or PM | PM |
| P | Timezone offset with colon | +01:00 |
| O | Timezone offset without colon | +0100 |
| e | Timezone identifier | Europe/London |
| T | Timezone abbreviation | BST |
| U | Unix timestamp | 1789999999 |
| c | ISO 8601 datetime | 2026-09-23T16:47:00+01:00 |
| r | RFC 2822 datetime | Wed, 23 Sep 2026 16:47:00 +0100 |
PHP date() tokens are what Carbon::format() uses. Y is a four-digit year, m a zero-padded month, d a zero-padded day, H 24-hour time. ISO 8601 is c; RFC 2822 is r. Parse a datetime, pick a format string, and copy the result.
Cron Expression Generator
Build, translate, and preview a 5-field cron schedule. See a human description and the next run times.
Laravel Str Helper Playground
Try Laravel Str helpers such as slug, snake, kebab, mask, and limit on a sample string.
PHP Regex Tester
Test a regular expression with PHP preg_match or preg_match_all and inspect capture groups.
From the blog
PHP date format tokens worth memorising (Y-m-d is not ISO 8601)
Carbon::format() is date(). Y, m, d, H, i, s cover most logs. Mixing tokens produces timestamps nobody can parse.
From the blog
Five-field cron in the Laravel scheduler (and why Quartz tokens fail)
Laravel schedule()->cron() uses Unix five-field expressions. Names, @daily, and Quartz tokens are not the same language.