<?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>strtotime &#8211; LPC影子技术分享</title>
	<atom:link href="https://www.mudbest.com/tag/strtotime/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.mudbest.com</link>
	<description>行影不离,忘之却步.</description>
	<lastBuildDate>Mon, 01 Oct 2012 12:14:46 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>
	<item>
		<title>PHP时间函数-获取指定日期上个月的第一天和最后一天</title>
		<link>https://www.mudbest.com/%e6%97%b6%e9%97%b4%e5%87%bd%e6%95%b0/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 23 Mar 2011 07:34:48 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[strtotime]]></category>
		<guid isPermaLink="false">http://www.mudbest.com/?p=508</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<pre class="brush: php; title: ; notranslate">
/**
 * by hkshadow
 * Enter description here ...
 * @param 1 or 30 $i
 */
function GetPurMonth($date) { //获取指定日期上个月的第一天和最后一天
	$time = strtotime ( $date );
	$firstday = date ( 'Y-m-01', strtotime ( date ( 'Y', $time ) . '-' . (date ( 'm', $time ) - 1) . '-01' ) );
	$lastday = date ( 'Y-m-d', strtotime ( &quot;$firstday +1 month -1 day&quot; ) );
	return array ($firstday, $lastday );
}

/**
 * by hkshadow
 * Enter description here ...
 * @param 1 or 30 $i
 */
function GetNextMonth($date) { //获取指定日期下个月的第一天和最后一天
	$arr = getdate ();
	if ($arr &#x5B;'mon'] == 12) {
		$year = $arr &#x5B;'year'] + 1;
		$month = $arr &#x5B;'mon'] - 11;
		$day = $arr &#x5B;'mday'];
		if ($day &lt; 10) {
			$mday = '0' . $day;
		} else {
			$mday = $day;
		}
		$firstday = $year . '-0' . $month . '-01';
		$lastday = $year . '-0' . $month . '-' . $mday;
	} else {
		$time = strtotime ( $date );
		$firstday = date ( 'Y-m-01', strtotime ( date ( 'Y', $time ) . '-' . (date ( 'm', $time ) + 1) . '-01' ) );
		$lastday = date ( 'Y-m-d', strtotime ( &quot;$firstday +1 month -1 day&quot; ) );
	}
	return array ($firstday, $lastday );
}
</pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
