节点树枝文件中的drupal 8渲染日期字段

drupal 8 render date field in node twig file

创建了一个内容类型的职位空缺,并有一个名为“发布于”的字段。添加日期为 22 DEC 2016.I 已经为此内容类型创建了节点树枝文件。日期字段不显示,即使张贴在标签上也不显示。将标签设为内联显示。

{% set date_custom %}
    {{ content.field_job_posted_date}}
{% endset %}

{{ date_custom|日期(格式='j F Y')}}

我想将此日期字段显示为 发表于 2016 年 12 月 22 日

提前致谢

如果你使用:

{{ date_custom|date(format='m D, Y') }}

我不确定这是否有效,但请尝试一下。