Utility for days and date spans
Install via composer
composer require clippings/date-utils
$span = new DaysSpan(new Days(20), new Days(40));
$start = new DateTime('today');
$dates = $span->toDateTimeSpan($start);
echo $dates->humanize();
// For week days
$span = new WeekDaysSpan(new WeekDays(20), new WeekDays(40));
$start = new DateTime('today');
$dates = $span->toDateTimeSpan($start);
// For business with support of lists of holidays
$holidays = new Holidays([
new DateTime('<Holiday 1>'),
new DateTime('<Holiday 2>'),
]);
$span = new BusinessDaysSpan(new BusinessDays(20, $holidays), new BusinessDays(40, $holidays));
$start = new DateTime('today');
$dates = $span->toDateTimeSpan($start);
Copyright (c) 2015, Clippings Ltd. Developed by Ivan Kerin
Under BSD-3-Clause license, read LICENSE file.