<?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>oscar8708.com</title>
	<atom:link href="http://oscar8708.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://oscar8708.com</link>
	<description>Oscar Flórez</description>
	<lastBuildDate>Sat, 21 Jan 2012 18:11:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Subtract dates with php</title>
		<link>http://oscar8708.com/subtract-dates-with-php/</link>
		<comments>http://oscar8708.com/subtract-dates-with-php/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 04:15:04 +0000</pubDate>
		<dc:creator>oscar8708</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://oscar8708.com/?p=23</guid>
		<description><![CDATA[Here is the function: function subtractDates($dFecIni, $dFecFin) { $dFecIni = str_replace("-", "", $dFecIni); $dFecFin = str_replace("-", "", $dFecFin); ereg("([0-9]{2,4})([0-9]{1,2})([0-9]{1,2})", $dFecIni, $aFecIni); ereg("([0-9]{2,4})([0-9]{1,2})([0-9]{1,2})", $dFecFin, $aFecFin); $date1 = mktime(0, 0, 0, $aFecIni[2], $aFecIni[3], $aFecIni[1]); $date2 = mktime(0, 0, 0, $aFecFin[2], $aFecFin[3], $aFecFin[1]); return round(($date2 - $date1) / (60 * 60 * 24)); } Returns the number of [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the function:</p>
<p><code><br />
function subtractDates($dFecIni, $dFecFin) {</p>
<p>$dFecIni = str_replace("-", "", $dFecIni);<br />
$dFecFin = str_replace("-", "", $dFecFin);</p>
<p>ereg("([0-9]{2,4})([0-9]{1,2})([0-9]{1,2})", $dFecIni, $aFecIni);<br />
ereg("([0-9]{2,4})([0-9]{1,2})([0-9]{1,2})", $dFecFin, $aFecFin);</p>
<p>$date1 = mktime(0, 0, 0, $aFecIni[2], $aFecIni[3], $aFecIni[1]);<br />
$date2 = mktime(0, 0, 0, $aFecFin[2], $aFecFin[3], $aFecFin[1]);</p>
<p>return round(($date2 - $date1) / (60 * 60 * 24));<br />
}<br />
</code></p>
<p>Returns the number of days between those dates.</p>
<p><a href="http://www.comocrearunsitioweb.com/restar-fechas-php">Taken from here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscar8708.com/subtract-dates-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

