sadapon2008 / business-day-finder
工作日查找器
1.0.1
2017-06-01 04:51 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-09-25 01:45:40 UTC
README
示例
<?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');