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 Todd  >  My Date  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: examples of myDate
Class: My Date
Format and display the dates
Author: By
Last change:
Date: 2004-04-13 10:09
Size: 593 bytes
 

Contents

Class file image Download
<?php
// script example.php
// uses class myDate

include("myDate.php");

$today = new myDate();
$x = new myDate();
$y = new myDate();
$z = new myDate();

$x->set_seperator(" @ "," , ");
$y->set_seperator(" # "," ");
$z->set_seperator(" | ");

$x->format_date("Y","l","F");
$y->format_date("l","Y","F");
$z->format_date("F","Y","l");

echo 
$today->get_date()."<br>"//returns 2004-04-13
echo $x->get_date()."<br>"// returns 2004@Tuesday,April
echo $y->get_date()."<br>"// returns Tuesday#2004 April
echo $z->get_date()."<br>"// returns April|2004|Tuesday



?>