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