Location: PHPKode > scripts > Date Compare > date-compare/Manual.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Manual ----- Calendar Generator</title>
<style type="text/css">
<!--
.style4 {
	font-size: 12px;
	font-family: Tahoma;
}
-->
</style>
</head>

<body>
<p class="style4"><strong> Date Manipulator &lt;gobinathm at gmail dot com&gt; </strong><strong>&nbsp;</strong></p>
<p class="style4"> The class can be used to get the next month date using a Date parameter &amp; it has other function where you can check whether the date you entered is Greater than the server date or not <br />
  <br />
Here is the Example create by implementing the class. </p>
<blockquote>
  <p class="style4">1. &lt;?php<br />
  2. include_once(&quot;DateAdd.class.php&quot;);<br />
  3. echo &quot;&lt;b&gt;&lt;u&gt;Get Next Month Date&lt;/u&gt;&lt;/b&gt;&lt;br&gt;&quot;;<br />
  4. $date = &quot;1-25-2005&quot;;<br />
  5. $dateFormat=&quot;m d Y&quot;;<br />
  6. $strSeperator=&quot;-&quot;;<br />
  7. echo &quot;Parameter Date : &quot;.$date.&quot;&lt;br&gt;&quot;;<br />
    8. $dateAd = new DateCK($date,$dateFormat,$strSeperator);<br />
    9. $tmpDate=$dateAd-&gt;MonthDate(&quot;Month&quot;);<br />
    10. echo &quot;Next Month Date : &quot;.$tmpDate.&quot;&lt;br&gt;&quot;;<br />
    11. $date = &quot;01-12-2005&quot;;<br />
    12. $dateFormat=&quot;m d Y&quot;;<br />
    13. $strSeperator=&quot;-&quot;;<br />
    14. echo &quot;&lt;br&gt;&lt;b&gt;&lt;u&gt;Check The date Whether its greater than server date or not&lt;/u&gt;&lt;/b&gt;&lt;br&gt;&quot;;<br />
    15. $dateCk = new DateCK($date,$dateFormat,$strSeperator);<br />
    16. $result=$dateCk-&gt;DateCheck();<br />
    17. echo &quot;Your Date : &quot;.$date;<br />
    18. echo &quot;&lt;br&gt;Server Date :&quot;.date(&quot;m-d-Y&quot;).&quot;&lt;BR&gt;&quot;; <br />
    19. if($result){<br />
    20. echo &quot;The date is Greater than Server Date&quot;;<br />
    21. }<br />
    22. else{<br />
    23. echo &quot;Your Date is Less than Server Date&quot;;<br />
  24. }<br />
  <span class="style4">25. ?&gt;</span><br />
  </p>
</blockquote>
<p> <span class="style4"><strong>
   Line 2 :</strong> Includes the Calendar Class to this script <strong><br />
   </strong>
   <strong>
Line 8 :</strong> Create an object of theDate Manipulator Pass the necessary parameters<br />
<strong>Line 9 :</strong> Call to the Function which will compate and get the next month date <strong><br />
  Line 15 : </strong>Create an object of theDate Manipulator Pass the necessary parameters<strong><br />
  Line 16 :</strong> Call the function which compare the date <strong><br />
</strong></span></p>
<p class="style4">Active Link: <a href="http://gobinath.com/Date%20Manipulator/example.php">http://gobinath.com/Date%20Manipulator/example.php</a></p>
<span class="style4">Alternative Download Link :<a href="http://gobinath.com/Date%20Manipulator/Date%20Manipulator.zip">http://gobinath.com/Date%20Manipulator/Date Manipulator.zip</a>
</span>
<p class="style4">&nbsp; </p>
</body>
</html>
Return current item: Date Compare