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

Veterans Day in USA subtitution #91

Closed
daffoxdev opened this issue Jan 30, 2018 · 3 comments
Closed

Veterans Day in USA subtitution #91

daffoxdev opened this issue Jan 30, 2018 · 3 comments
Labels
Milestone

Comments

@daffoxdev
Copy link

daffoxdev commented Jan 30, 2018

Hi.
Looks like Veterans Day(11 november) in USA in 2018 will be substituted by 12 november (monday), but the library not showing that. I'm right?

As I see in code, there no calculations for this holiday in case of substitution.

in file Provider/USA.php:

<?php
//...
          // Only process New Year's Day, Independence Day, or Christmas Day
            if (in_array(
                $datesIterator->current()->shortName,
                ['newYearsDay', 'independenceDay', 'christmasDay'],
                true
            )) {
//...

Thank you.

@daffoxdev daffoxdev changed the title Veterans Day subtitution Veterans Day in USA subtitution Jan 30, 2018
@stelgenhof
Copy link
Member

Perhaps the substitution rules for the USA are not perfectly correct in the USA Provider. This part of the code only determines substitutions for those 3 holidays.

However, looking at this source: https://en.wikipedia.org/wiki/Federal_holidays_in_the_United_States it looks to be the other way around. New Years Day, Independence Day, Veterans Day and Christmas Day are all fixed.

I'm maybe not all that familiar with the USA official rules. Do you maybe have a good source for that?

Cheers! Sacha

@jagers
Copy link
Contributor

jagers commented Mar 5, 2019

Per wikipedia,

holiday falling on a Saturday is observed on the preceding Friday, while a holiday falling on a Sunday is observed on the succeeding Monday

The official executive order can be found here:
https://www.archives.gov/federal-register/codification/executive-order/11582.html

Section 3(a) essentially means that all holidays are eligible to have substitute holidays, not just New Years Day, Independence Day, and Christmas Day. In reality, this library is only missing Veteran's day since that is the only other day that is not guaranteed to fall on a weekday.

@stelgenhof
Copy link
Member

Resolved in release v2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants