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 maran emil  >  Make Days List  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example file
Class: Make Days List
Generate arrays of dates between two given days
Author: By
Last change: Update class call and settings
Date: 2 years ago
Size: 719 bytes
 

Contents

Class file image Download
<?

/** 
     * Example file where you can see the list of days
     * Author: Maran Emil Cristian
     * Email: maran_emil@yahoo.com
     * Created: 30.10.2007
     * Updated: 15.03.2012
     **/

include('ClassMakeDayslist.class.php');

// example
$wDateStart "2012-03-11"// the start date
$wDateEnded "2012-04-07"// the end date
$wDateType    "timestamp";    // options - timestamp (1331938800) / normaldate ( 2012-04-07 )


$dt = new DateTimeTransform();
$dt->setDateStart($wDateStart);
$dt->setDateEnded($wDateEnded);
$dt->setDateType($wDateType);

$listdate $dt->GenerateDaysList();  // generate array  list

foreach($listdate as $value){
    echo 
$value."<BR>"// print all days
}

?>