<?php
/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
Simple example using web interface.
Should output something like:
The future: 2009/06/23 - 15:00 - CET
** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
require_once "./class.unixDate.php";
$date = new unixDate;
$result1 = $date->date();
$result2 = $date->date( "now +1 year +2 days +5 hours +30 minutes",
"%Y/%0m/%0d - %0k:%0M - %Z" );
print "<html><head><title>Check Date</title></head><body>\n";
print "<h2>Checking class.unixDate.php</h2>\n";
print "------------------------------------------------------<br />\n";
print "The future: ".$result2."<br />\n";
print "is right now plus 1 year 2 days 5 hours and 30 minutes.<br />\n";
print "Right now is by the way ".$result1."<br />\n";
print "------------------------------------------------------<br />\n";
print "2008/12/15 +30 days = ".
$date->date( "2008/12/15 +30 days", "%Y/%0m/%0d" ).
"<br />\n";
print "------------------------------------------------------<br />\n";
print "2009/01/14 -30 days = ".
$date->date( "2009/01/14 -30 days", "%Y/%0m/%0d" ).
"<br />\n";
print "------------------------------------------------------<br />\n";
print "</body></html>";
?>
|