holidays / holidays

A collection of Ruby methods to deal with statutory and other holidays. You deserve a holiday!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shouldn't July 3, 2026 be "Independence Day (observed)" in the US?

stephancom opened this issue · comments

While upgrading my project to Ruby 3, I bumped this gem and was surprised to see a failing test in the app using it - we specifically test that July 3, 2026 shows up as an observed holiday - the 4th is a Saturday.

I was even more surprised to see the relevant line here:

{:mday => 4, :function => "to_weekday_if_weekend(date)", :function_arguments => [:date], :name => "Independence Day (Holiday)", :regions => [:us_va]},

I'm not that familiar with Holidays (yet), but if I'm reading that right, it's only a holiday in Virginia. I'm not sure yet if I just need to switch :us_va to :us, or if I need to combine it with the previous line, or change :function/:function_arguments to :observed/:observed_argument ... or what?

It looks as if it's been that way for ~5 years, since 2244ca6

Before I go fixing that and putting in a PR for the change, I wanted to make sure there isn't a specific reason for it?

oh... or is this perhaps covered under the federalreserve region?

Ah, yeah, I see, that's why, sorry!