Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

For a software dev like me who has no idea how to create a cute hand-drawn dashed line, this course just 100% works.

— Ira Zayats, 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') }}
{{ Statamic::modify($event_date)->formatLocalized('%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 →