PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Tariqul Islam   PHP Working Days   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Usage Example
Class: PHP Working Days
Calculate the total working days between two dates
Author: By
Last change: Update of example.php
Date: 4 months ago
Size: 401 bytes


Class file image Download

//initialize the class
$twd = new totalWorkingDays();
//set Holiday by its name (optional)
//set Dates as Holiday (optional)
$twd->setHolidate(array('1st January 2015', '2015-01-12', '21-01-2015'));
//Calculate to find total working days
echo $twd->calculate("2015-01-01", "2015-01-31") . " Working days.";