定制 pronamic/wp-datetime 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pronamic/wp-datetime

最新稳定版本:v2.1.8

Composer 安装命令:

composer require pronamic/wp-datetime

包简介

WordPress DateTime library.

README 文档

README

WordPress Filters

pronamic_datetime_default_format

function prefix_pronamic_datetime_default_format( $format ) { return _x( 'D j M Y \a\t H:i', 'default datetime format', 'pronamic-ideal' ); } add_filter( 'pronamic_datetime_default_format', 'prefix_pronamic_datetime_default_format' );

Note date_i18n

It is important to note that date_i18n():

  1. does not have full feature parity with date(), not all formats are supported (such as shorthands);
  2. does not accept Unix timestamp (despite documented to), the expected value is “WordPress timestamp” (offset by time zone);
  3. has issues with certain timezone settings, such as numerical ones;
  4. does nothing with $gmt argument under normal circumstances;

Any use of this function must be carefully audited for correctness, especially in regards to output of time zones.

Source: https://developer.wordpress.org/reference/functions/date_i18n/#comment-2403

Inspiration

Pronamic - Work with us

统计信息

  • 总下载量: 129.18k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 6
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固