Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for business days and holidays #12

Open
kalenjordan opened this issue Oct 3, 2013 · 0 comments
Open

Support for business days and holidays #12

kalenjordan opened this issue Oct 3, 2013 · 0 comments

Comments

@kalenjordan
Copy link

Have you thought at all about adding support for business days?

So for example, if

$date = new ExpressiveDate;  // Let's say this is a Friday
$date->addDays(1);  // This would give you Saturday

$date->addBusinessDays(1);  // This would give you Monday

Support for holidays would be a little more complicated, because we would probably need to pass in the holidays into object configuration somehow, since it will vary by country / locale.

But maybe, $holidays were an array of date objects:

$holidays = array(
    $monday
);
ExpressiveDave::initializeHolidays($holidays);
$date->addBusinessDays(1); // This would be Tuesday, since Monday is holiday
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant