douchen4534 2018-10-19 20:07
浏览 20

php date_format()ante-和post-meridian with periods

I am wondering if it is possible to use PHP's date_format() to specify the abbreviation for ante-meridian and post-meridian with periods.

For instance, the manual indicates these codes:

a   Lowercase Ante meridiem and Post meridiem   am or pm
A   Uppercase Ante meridiem and Post meridiem   AM or PM

However, our organization's style guide calls for a periods in the abbreviation, like so:

10:00 p.m.

We are using the Drupal CMS platform. It has special date-formatter tools for its fields, which allows one to specify a pattern that date_format() will accept. So, in this situation I am not easily able to add some php code to look at the abbreviation and add periods appropriately. To avoid a large work-around, I must simply specificy a format string for the date_format() function.

Is there a way I can get the date_format() function to return an abbreviated am or pm with periods?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料