使用不同的时间函数可以改变格式:
1.the_date_xml()函数
调用语句:
- <?php the_date_xml(); ?>
显示格式为:YYYY-MM-DD
例子:2010-03-31
2.the_time()函数
调用语句格式:
- <?php the_time( $d ); ?>
例子1:
- <?php the_time('g:i a'); ?>
显示格式为:10:36 下午(英文版下显示不同,系统会自动翻译,下面如同)
例子2:
- <?php the_time('G:i'); ?>
显示格式为: 17:52
例子3:
- <?php the_time('F j, Y'); ?>
显示格式为:二月 2, 2010
例子4:
- <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?>
显示格式为:二月 17, 2010 at 7:19 下午
阅读全文…