How to print custom date format in Twig? How can I print a custom date format in Twig?  First of all my I am trying to edit the field.html.twig of the field called field_publication_date, in that file I find this variable {{ item.content }} which prints   Jun, 12/06/2016 - 12:29.  

This is what I have tried: {{ item.content.field_publication_date|format_date('M') }}
Try to use this -

{{ item.content.field_publication_date|date("M") }}


But, I think you will get your solution in 

{{ item.content|date("M") }}


Where item.content contains the date string inside field--node--field-publication-date.html.twig.