热点

WordPress 时间日期函数

发布: 2023年12月25日阅读: 1,258

wordpress 时间日期 the_time

我们用wordpress系统进行网站建设开发网站时,关于wordpress的时间相关函数应用,以及wp的时间显示函数。

 

1、输出 2023-12-25

<?phpthe_time('Y-m-d');?>

 

2、输出时间,如:10:35:28

<?phpthe_time('G:i:s');?>

 

3、输出 2023年12月25日

<?phpthe_time('Y年m月d日');?>

 

4、输出 2023年12月25日 星期一

<? php the_time ( 'Y年m月d日 l' ) ; ?>

 

5、输出完整的日期,如 2023年12月25日 星期一 10:35:28

<? php the_time ( 'Y年m月d日 l G:i:s' ) ; ?>

 

我们通常会使用 wordpress 的 the_time() 系统函数之外,wordpress还有更多的时间函数,比如 get_the_time() 函数等。

 

 

 

 

 

 

推荐阅读

2024年清明节公司放假通知2024清明放假6542024-03-21

wordpress获取分类下文章列表四种方法wordpress1,2092022-11-05

上海松一与捷捷微电股份集团官网建设项目网站建设1,1012022-04-06

2023年上海松一五一劳动节放假安排放假通告1,1742023-04-26