
wordpress如何获取日期、时间,下面web建站小编给大家详细介绍一下关于the_time()函数的基本用法!
wordpress获取基本时间
the_time获取年月日
<? php the_time('Y年n月j日'); ?>
the_time获取年月日星期
<? php the_time('Y年n月j日l'); ?>
the_time获取时分秒
<? php the_time('G:i:s'); ?>
the_time基本参数
| 参数 | 参数描述 | 输出时间格式 | 
| d | 日期 | 06 | 
| j | 日期 | 6 | 
| D | 星期 | 一 | 
| F | 月份 | 一月 | 
| g | 小时 | 6 | 
| G | 小时 | 06 | 
| h | 分钟 | 6 | 
| H | 分钟 | 06 | 
| a | 上下午 | am/pm | 
| A | 上下午 | AM/PM | 
| l | 星期 | 星期一 | 
| m | 月份 | 01 | 
| M | 月份 | Jan | 
| n | 月份 | 6 | 
| O | 时区 | +0800 | 
| r | 完整的日期时间 | Mon, 06 Jan 2010 20:30:10 +0800 | 
| S | 序列型数字的后缀 | st/th | 
| T | 时区 | CST | 
| w | 星期 | 2 | 
| W | 周数 | 22 | 
| y | 年份 | 10 | 
| Y | 年份 | 2010 | 
| z | 天数 | 365 | 
WordPress版本如何使用str_starts_with和str_ends_with函数
wordpress教程如何输出用于回复评论的隐藏输入html
标签: the_time, wordpress函数, wordpress日期格式, wordpress时间格式, wordpress获取日期
上面是“wordpress日期/时间格式基本用法”的全面内容,想了解更多关于 wordpress 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_3766.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

 css如何设置禁止点击事件