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

12/31/1999 US #128

Closed
bmarons2 opened this issue Jan 30, 2019 · 3 comments
Closed

12/31/1999 US #128

bmarons2 opened this issue Jan 30, 2019 · 3 comments
Assignees
Labels

Comments

@bmarons2
Copy link

Important specifications

US

Description

Code

            var publicHolidays = DateSystem.GetPublicHoliday("US", 2000);
            foreach (var publicHoliday in publicHolidays)
            {
                Console.WriteLine( publicHoliday.Name + " " + publicHoliday.Date.ToShortDateString());
            }

            Console.WriteLine(   
            DateSystem.IsPublicHoliday(DateTime.Parse("12/31/1999"),CountryCode.US));

Output

New Year's Day 12/31/1999
Martin Luther King, Jr. Day 1/17/2000
Presidents' Day 2/21/2000
Memorial Day 5/29/2000
Independence Day 7/4/2000
Labour Day 9/4/2000
Columbus Day 10/9/2000
Veterans Day 11/10/2000
Thanksgiving Day 11/23/2000
Christmas Day 12/25/2000
False
Press any key to continue . . .

12/31/1999 is a public holiday for the year 2000 but when you call IsPublicHoliday(DateTime.Parse("12/31/1999"),CountryCode.US)); it returns false. This is because the Holiday is for the year 2000 not 1999

@tinohager tinohager self-assigned this Jan 30, 2019
@tinohager tinohager added the bug label Jan 30, 2019
@tinohager
Copy link
Member

I have add a new unit test following countries have an issue MX/PR/US. I'll check that out more closely over the next few days.

@tinohager
Copy link
Member

If you are from america? What is the right solution? Add 2 entrys in the calendar?

For example
Fr | 30. Dez | New Year's Eve observed
Sa | 31. Dez | New Year's Eve

@tinohager
Copy link
Member

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

2 participants