<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: PHP- Adding And Subtracting Dates</title>
	<atom:link href="http://www.brightcherry.co.uk/scribbles/php-adding-and-subtracting-dates/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brightcherry.co.uk/scribbles/php-adding-and-subtracting-dates/</link>
	<description></description>
	<lastBuildDate>Sat, 21 Jan 2012 16:15:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: ain</title>
		<link>http://www.brightcherry.co.uk/scribbles/php-adding-and-subtracting-dates/#comment-3175</link>
		<dc:creator>ain</dc:creator>
		<pubDate>Fri, 30 Dec 2011 03:28:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=128#comment-3175</guid>
		<description>Hi, I need help..

i&#039;ve date from database in format : 19/11/2009...i need to adding 2 weeks from this date

$date = &quot;1/11/2009&quot;;

so, here i need to convert it first into english format right?

$date = date ( &#039;Y-m-d&#039; , $date );			
$newdate = strtotime ( &#039;+2 week&#039; , strtotime ( $date ) ) ;
$newdate = date ( &#039;d/m/Y&#039; , $newdate);


The codes gives result 15/01/1970, the correct result should be 21/11/2011

Can anyone help me with this..thanks..</description>
		<content:encoded><![CDATA[<p>Hi, I need help..</p>
<p>i&#8217;ve date from database in format : 19/11/2009&#8230;i need to adding 2 weeks from this date</p>
<p>$date = &#8220;1/11/2009&#8243;;</p>
<p>so, here i need to convert it first into english format right?</p>
<p>$date = date ( &#8216;Y-m-d&#8217; , $date );<br />
$newdate = strtotime ( &#8216;+2 week&#8217; , strtotime ( $date ) ) ;<br />
$newdate = date ( &#8216;d/m/Y&#8217; , $newdate);</p>
<p>The codes gives result 15/01/1970, the correct result should be 21/11/2011</p>
<p>Can anyone help me with this..thanks..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian</title>
		<link>http://www.brightcherry.co.uk/scribbles/php-adding-and-subtracting-dates/#comment-2195</link>
		<dc:creator>Ian</dc:creator>
		<pubDate>Tue, 05 Jul 2011 13:42:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=128#comment-2195</guid>
		<description>This looks great but how do I get a certain number of days e.g. -3 days to subtract from a variable date that is selected by the user in a drop-down calendar, on a previous page???</description>
		<content:encoded><![CDATA[<p>This looks great but how do I get a certain number of days e.g. -3 days to subtract from a variable date that is selected by the user in a drop-down calendar, on a previous page???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: saurabh</title>
		<link>http://www.brightcherry.co.uk/scribbles/php-adding-and-subtracting-dates/#comment-2154</link>
		<dc:creator>saurabh</dc:creator>
		<pubDate>Thu, 16 Jun 2011 05:09:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=128#comment-2154</guid>
		<description>chill, here is how you can add substract days as variables:

$diff = 16;

$newdate = strtotime( ‘+’ . $diff .’ day’ , strtotime ( $date1 ) ) ;</description>
		<content:encoded><![CDATA[<p>chill, here is how you can add substract days as variables:</p>
<p>$diff = 16;</p>
<p>$newdate = strtotime( ‘+’ . $diff .’ day’ , strtotime ( $date1 ) ) ;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pratik</title>
		<link>http://www.brightcherry.co.uk/scribbles/php-adding-and-subtracting-dates/#comment-2079</link>
		<dc:creator>pratik</dc:creator>
		<pubDate>Fri, 13 May 2011 06:20:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=128#comment-2079</guid>
		<description>i need to add 60 years but i am unable with it.
i am just able to add 27 years only.
plz help me</description>
		<content:encoded><![CDATA[<p>i need to add 60 years but i am unable with it.<br />
i am just able to add 27 years only.<br />
plz help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nabeel</title>
		<link>http://www.brightcherry.co.uk/scribbles/php-adding-and-subtracting-dates/#comment-1975</link>
		<dc:creator>Nabeel</dc:creator>
		<pubDate>Mon, 18 Apr 2011 12:39:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=128#comment-1975</guid>
		<description>Thanks for the tutorial. It helped a lot. :)</description>
		<content:encoded><![CDATA[<p>Thanks for the tutorial. It helped a lot. <img src='http://www.brightcherry.co.uk/scribbles/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

