Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Emilio Rodríguez  >  CDate  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: CDate
Class to perform manipulation of dates
Author: By
Last change:
Date: 2003-07-28 20:52
Size: 422 bytes
 

Contents

Class file image Download
<?php
// script example.php
// uses class CDate 
// for date of tomorrow calculation

include("cdate.php");
$tomorrow = new CDate();
$tomorrow -> AddTime(0,0,1);
echo 
"Date of tomorrow is: ".$tomorrow->ReadDate();

echo 
"<br /><br />";

$OneMonthAfterJuly4 = new CDate(2003,7,4);
$OneMonthAfterJuly4 -> AddTime(0,1,0);
echo 
"Date of one month after July 4, 2003 is: ".$OneMonthAfterJuly4 -> ReadDate();

?>