PHP Classes

File: holidays_test.php

Recommend this page to a friend!
  Classes of Si Cranmer   Work Days   holidays_test.php   Download  
File: holidays_test.php
Role: Example script
Content type: text/plain
Description: Example of Script useage
Class: Work Days
Calculate business days between dates
Author: By
Last change:
Date: 17 years ago
Size: 664 bytes
 

Contents

Class file image Download
<?

/*

  i-Bridge Systems Software Solutions
  http://www.ibridge.co.uk

    example script

*/

   
define("RelativePath", ".");
  require(
RelativePath . "/clsWorkDays.php");

   
$dates = new clsWorkDays;

   
$business_days = $dates->days_diff('2006-12-21', '2006-12-31');
   
$week_days = $dates->days_diff('2006-12-21', '2006-12-31', TRUE, FALSE);
   
$actual_days = $dates->days_diff('2006-12-21', '2006-12-31', FALSE, FALSE);

    echo
'<table>'.
       
'<tr><td>Work Days </td><td>'.$business_days.'</td></tr>'.
       
'<tr><td>Week Days </td><td>'.$week_days.'</td></tr>'.
       
'<tr><td>Physical Days </td><td>'.$actual_days.'</td></tr>'.
       
'</table>';

?>