<?php
require_once('vendor/autoload.php');
use HolidayJp\HolidayJp; // k1low/holiday_jp
use BusinessDayFinder\Holiday;
use BusinessDayFinder\Finder;
$holidays = HolidayJp::between(new DateTime('2010-01-01'), new DateTime('2020-12-31'));
$holidaysForFinder = array();
foreach ($holidays as $holiday) {
$holidaysForFinder[] = new Holiday($holiday['date'], $holiday['name']);
}
$finder = new Finder();
$finder->addHolidayArray($holidaysForFinder);
$ret = $finder->getBusinessDayForward(new DateTime('2017-01-01'));
echo $ret->format('Y-m-d');
-
Notifications
You must be signed in to change notification settings - Fork 0
sadapon2008/business-day-finder
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Packages 0
No packages published