Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Just exceptional. Thank you so much, Jack, you smashed it.

— Hugo, Developer

format_localized Modifier

Warning!

Since Carbon 2.55.0 formatLocalized has been deprecated. Please use the iso_format modifier instead.

Given a date string, or anything that sort of looks like a date string, format will convert it to a Carbon instance and allow you to format it with PHP's strftime format variables. It will use the current locale defined in your system settings.

For this to work you will need to have the necessary locales installed in your hosting environment.

event_date: April 15 2016
{{ event_date | format_localized('%A %d %B %Y') }}

Assuming your locale is fr_FR:

Vendredi 15 avril 2016
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →