business-days-calculator 0 scrutinizer travis-ci Packagist

Business Days Calculator

3 years after

business-days-calculator

Business Days Calculator

Build Status Scrutinizer Quality ScoreCoverage Status Latest Stable Version License

Install

"require": {
    "andrejsstepanovs/business-days-calculator": "1.*",
}

Example

use \BusinessDays\Calculator;

$holidays = [
    new \DateTime('2000-12-31'),
    new \DateTime('2001-01-01')
];

$freeDays = [
    new \DateTime('2000-12-28')
];

$freeWeekDays = [
    Calculator::SATURDAY,
    Calculator::SUNDAY
];

$calculator = new Calculator();
$calculator->setStartDate(new \DateTime('2000-12-27'));
$calculator->setFreeWeekDays($freeWeekDays); // repeat every week
$calculator->setHolidays($holidays);         // repeat every year
$calculator->setFreeDays($freeDays);         // don't repeat

$calculator->addBusinessDays(3);             // add X working days

$result = $calculator->getDate();            // \DateTime
echo $result->format('Y-m-d');               // 2001-01-03

Related Repositories

public-apis

public-apis

A collective list of public JSON APIs for use in web development. ...

qdirstat

qdirstat

QDirStat - Qt-based directory statistics (KDirStat without any KDE - from the or ...

alexa-skills-list

alexa-skills-list

A complete list of all available Alexa Skills ...

tech-and-venture-capital-toolkit

tech-and-venture-capital-toolkit

:money_with_wings: :chart_with_upwards_trend: :rocket: Tech and Venture Capital ...


Top Contributors

andrejsstepanovs styks1987

Releases

-   v1.0.0 zip tar