<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>等待-放飞梦想 &#187; 时间</title>
	<atom:link href="http://leotheme.cn/tag/%e6%97%b6%e9%97%b4/feed" rel="self" type="application/rss+xml" />
	<link>http://leotheme.cn</link>
	<description>勤现在-乐将来</description>
	<lastBuildDate>Mon, 21 May 2012 09:45:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>WordPress日期和时间函数：the_time()</title>
		<link>http://leotheme.cn/wordpress/wpfunction/wordpress-function-time.html</link>
		<comments>http://leotheme.cn/wordpress/wpfunction/wordpress-function-time.html#comments</comments>
		<pubDate>Fri, 03 Jul 2009 09:48:09 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP函数摘录]]></category>
		<category><![CDATA[WP相关]]></category>
		<category><![CDATA[参数]]></category>
		<category><![CDATA[时间]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=673</guid>
		<description><![CDATA[在wordpress主题中，有的时候我们会涉及到wordpress时间的格式，每次都去找很麻烦，查了一下WordPress的时间函数，以及调用的时候的时间参数，所谓时间参数，是WordPress应用时间函数时所调用的参数，基于WordPress的博客平台通常会在文章的标题处调用时间函数来显示文章的发表时间。 文章的时间函数为：&#60;?php the_time() ?&#62; 评论的时间函数为：&#60;?php&#160;comment_date() ?&#62; 评论的日期函数为：&#60;?php&#160;comment_time() ?&#62; WordPress的全部时间参数及显示效果： a代表小写的英语的上下午，如am、pm A代表大写的英语的上下午，如AM、PM d代表英语的日期（小于10仍为两位数写法），如05、12 D代表中文的星期，如五、七 F代表中文的月份（包括“月”这个字），如五月、十二月 g代表英语的小时（小于10为一位数写法），如5、12 G代表英语的小时（小于10仍为两位数写法），如05、12 h代表英语的分钟（小于10为一位数写法），如5、12 H代表英语的分钟（小于10仍为两位数写法），如05、12 j代表英语的日期（小于10为一位数写法），如05、12 l代表中文的星期（包括“星期”这两个字），如星期五、星期七 m代表英语的月份（小于10仍为两位数写法），如05、12 M代表英语的月份（以单词的形式显示），如Jun n代表英语的月份（小于10为一位数写法），如5、12 O代表英语的时区，如+0800 r代表完整的日期时间，如Tue, 06 Jun 2006 18:37:11 +0800 S代表日期的序数后缀，如st、th T代表英语的时区（以单词的形式显示），如CST w代表英语的星期，如5、7 W代表周数，如23 y代表两位数年份，如07、08 Y代表四位数年份，如2007、2008 z代表天数，如156 原来模板的发布时间是英文格式，要改成现在这样的中文格式，在模板的Single.php 和Index.php里面相应的把 &#60;?php the_time(’M jS, Y’) ?&#62; 替换为 &#60;?php the_time(Y年n月d日) ?&#62; 相关文章2011-09-01 -- WordPress主题：perfct 1.0 (96)已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已...2011-06-07 -- 一个实用的wordpress导航 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress评论表单验证" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196493.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress评论表单验证</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题高级技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-hacks.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题高级技巧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress定制首页输出" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-customize-homepage.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress定制首页输出</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="再谈wordpress的表情插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresssmiliesplugins.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">再谈wordpress的表情插件</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>在wordpress主题中，有的时候我们会涉及到wordpress时间的格式，每次都去找很麻烦，查了一下WordPress的时间函数，以及调用的时候的时间参数，所谓时间参数，是WordPress应用时间函数时所调用的参数，基于WordPress的博客平台通常会在文章的标题处调用时间函数来显示文章的发表时间。<br />
<span id="more-673"></span></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Gray;">文章的时间函数为：</span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">the_time</span><span style="color: Olive;">()</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span></li>
<li><span style="color: Gray;">评论的时间函数为：</span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">comment_date</span><span style="color: Olive;">()</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span></li>
<li><span style="color: Gray;">评论的日期函数为：</span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">comment_time</span><span style="color: Olive;">()</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span></li></ol></div>
<p>WordPress的全部时间参数及显示效果：</p>
<ul>
<li>a代表小写的英语的上下午，如am、pm</li>
<li> A代表大写的英语的上下午，如AM、PM</li>
<li> d代表英语的日期（小于10仍为两位数写法），如05、12</li>
<li> D代表中文的星期，如五、七</li>
<li> F代表中文的月份（包括“月”这个字），如五月、十二月</li>
<li> g代表英语的小时（小于10为一位数写法），如5、12</li>
<li>G代表英语的小时（小于10仍为两位数写法），如05、12</li>
<li> h代表英语的分钟（小于10为一位数写法），如5、12</li>
<li> H代表英语的分钟（小于10仍为两位数写法），如05、12</li>
<li> j代表英语的日期（小于10为一位数写法），如05、12</li>
<li>l代表中文的星期（包括“星期”这两个字），如星期五、星期七</li>
<li> m代表英语的月份（小于10仍为两位数写法），如05、12</li>
<li> M代表英语的月份（以单词的形式显示），如Jun</li>
<li>n代表英语的月份（小于10为一位数写法），如5、12</li>
<li>O代表英语的时区，如+0800</li>
<li>r代表完整的日期时间，如Tue, 06 Jun 2006 18:37:11 +0800</li>
<li> S代表日期的序数后缀，如st、th</li>
<li> T代表英语的时区（以单词的形式显示），如CST</li>
<li>w代表英语的星期，如5、7</li>
<li>W代表周数，如23</li>
<li>y代表两位数年份，如07、08</li>
<li> Y代表四位数年份，如2007、2008</li>
<li> z代表天数，如156</li>
</ul>
<p>原来模板的发布时间是英文格式，要改成现在这样的中文格式，在模板的Single.php 和Index.php里面相应的把
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">the_time</span><span style="color: Olive;">(</span><span style="color: Gray;">’</span><span style="color: Blue;">M</span><span style="color: Gray;"> </span><span style="color: Blue;">jS</span><span style="color: Gray;">, </span><span style="color: Blue;">Y</span><span style="color: Gray;">’</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span></div></div>
<p>替换为
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">the_time</span><span style="color: Olive;">(</span><span style="color: Blue;">Y</span><span style="color: Gray;">年</span><span style="color: Blue;">n</span><span style="color: Gray;">月</span><span style="color: Blue;">d</span><span style="color: Gray;">日</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span></div></div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress评论表单验证" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196493.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress评论表单验证</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题高级技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-hacks.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题高级技巧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress定制首页输出" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-customize-homepage.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress定制首页输出</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="再谈wordpress的表情插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresssmiliesplugins.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">再谈wordpress的表情插件</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2011-09-01 -- <a href="http://leotheme.cn/wordpress/wordpress-themes-perfct.html" title="WordPress主题：perfct 1.0">WordPress主题：perfct 1.0</a> (96)<br /><small>已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/%e4%b8%80%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84wordpress%e5%af%bc%e8%88%aa.html" title="一个实用的wordpress导航">一个实用的wordpress导航</a> (0)<br /><small>在Wordpress模板函数库中的“链接函数”（在wp-includesLink-template.php中）有2个函数可以得到前、后文章链接：

    previous_post_link()...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/wordpress-query-post-paged.html" title="解决wordpress分页问题">解决wordpress分页问题</a> (0)<br /><small>这是为解决使用query_post()函数调用某一类文章后引起的分页问题的办法。

query_post()非常有用，可以输出wordpress主循环以外的自定义文章，但是缺点在于覆盖了post变...</small></li><li>2009-11-30 -- <a href="http://leotheme.cn/javascript/ajax-load-post-content.html" title="不刷新（AJAX）获取文章的内容">不刷新（AJAX）获取文章的内容</a> (53)<br /><small>相信大家都知道AJAX评论这玩意。AJAX评论带来了很多好处，不用在刷新页面就能发表评论。实时提交，实时显示。很多人都用上了都给自己的BLOG上添加了这样的功能。方法在这就不说了，很多人都作了详细的讲...</small></li><li>2009-07-07 -- <a href="http://leotheme.cn/wordpress/wpfunction/wp_list_pages.html" title="WordPress页面函数：wp_list_pages()">WordPress页面函数：wp_list_pages()</a> (16)<br /><small>模板标签wp_list_pages( )将WordPress页面作为链接显示出来。该模板标签常用于自定义侧边栏或标题，也常用于其他模板中。该模板标签在WordPress 1.5及更新版本中可用。
用...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/wpfunction/wordpress-function-time.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

