Date Format String Converter
Translate a date format string between PHP date(), strftime, MySQL DATE_FORMAT, Moment and Day.js, Unicode patterns (date-fns, Java, ICU) and Go layouts, with a live preview.
Free · No sign-up · Your inputs stay in your browser
Input
Translate date format strings between languages
Output
Tuesday, 27th October 2026 at 2:05pm
| Language | Format | |
|---|---|---|
| PHP date() / Carbon format() | l, jS F Y \a\t g:ia | |
| strftime (C, Python, Ruby) | %A, %-d{suffix} %B %Y at %-I:%M{a} | no token for: suffix, a |
| MySQL DATE_FORMAT | %W, %e{suffix} %M %Y at %l:%i{a} | no token for: suffix, a |
| Moment / Day.js / Carbon isoFormat | dddd, D{suffix} MMMM YYYY[ at ]h:mma | no token for: suffix |
| Unicode (date-fns, Java, Intl, ICU) | EEEE, d{suffix} MMMM yyyy' at 'h:mm{a} | no token for: suffix, a |
| Go time layout | Monday, 2{suffix} January 2006 at 3:04pm | no token for: suffix |
The preview uses the page date at 14:05:09.042 UTC. Watch the traps this table exists for: m is month in PHP and minutes elsewhere (i in PHP, mm in Moment), Moment's DD is day of month while Unicode's DD is day of year, and YYYY in Unicode patterns is the week-based year, so yyyy is the one you want. PHP's z (day of year) counts from 0, so it is not offered as an equivalent.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
The same letters mean different things
In PHP m is the month and i the minutes; in Moment mm is minutes and MM the month. Moment's DD is the day of the month, while in Unicode patterns DD is the day of the year. Unicode's YYYY is the week-numbering year, which differs from the calendar year in the last days of December, so yyyy is the one you want. The patterns are defined in Unicode TR35; PHP's letters are in the DateTimeInterface::format reference.
Go's reference time
Go has no letters: a layout is the reference time Mon Jan 2 15:04:05 MST 2006 written the way you want dates to look, so 2006-01-02 means year-month-day.