如何添加自定义 Drupal 日期格式? [英] How can a custom Drupal date format be added?

查看:34
本文介绍了如何添加自定义 Drupal 日期格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何添加自定义 Drupal 日期格式.我想显示没有小时和分钟的日期,但选项不包括它.

How do you add a custom Drupal date format. I want to display the date without hours and minutes, but the options don't include it.

推荐答案

执行以下操作:

  1. 管理 » 配置 » 区域和语言 » 日期和时间

  1. Administration » Configuration » Regional and language » Date and Time

在那里你会看到一个格式标签.

There you will see a tab for format.

创建一个新的格式字符串Y-M-d".

Create a new format string "Y-M-d".

将其设为所有日期字段的默认值,您将不会再看到秒数.

Make this as your default for all date fields and you won't see the seconds any more.

基本格式设置不需要日期模块.

You don't need the date module for basic formatting.

干杯,维沙尔

下面是图片,以便您知道它在哪里.

Below is the image so that you know where it is.

这篇关于如何添加自定义 Drupal 日期格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆