sadapon2008 / business-day-finder
BusinessDay Finder
Installs: 4 533
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-01-01 03:14:10 UTC
README
Example
<?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');