GothenburgBitFactory / holidata

Holidata is the core of holidata.net, a no-nonsense, ad-free provider of international holiday data.
https://holidata.net
MIT License
43 stars 11 forks source link

Removal of Columbus Day as an US Holiday #90

Closed seandtaber closed 1 year ago

seandtaber commented 1 year ago

Issue 89

Is it possible to simply remove Columbus Day as a holiday? A clear and concise description of what the bug is.

Which locale is affected? en-US Which holidays are affected? Columbus Day Which years does the bug affect? 2022 and future Additional context Most US businesses no longer recognize this day an US official holiday and is now referred to as Indigenous People's Day.

lauft commented 1 year ago

Hi @seandtaber!

Thanks for the update! 👍🏻

To me the situation seems to depend on the respective state. According to here, there are several states which have either abandoned Columbus Day and/or added Indigenous Peoples Day or a similar one.

The 'correct' procedure would be

  1. to replace line 19 by a function which returns Columbus Day annotated with the celebrating states for the respective years (starting from 2011)
  2. to add another function which does the similar for Indigenous People Day
  3. and of course adapt the snapshot tests

As a first measure, one could implement the proposed function such that it simply ends Columbus Day in 2022, e.g.

def holiday_columbus_day(self):
    """2. monday in October: [NV] Columbus Day"""
    return [Holiday(
        self.locale,
        "",
        SmartDayArrow(self.year, 10, 1).shift_to_weekday("monday", order=2),
        "Columbus Day",
        "NV"
    )] if self.year < 2022 else []