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

Issue with Day after Thanksgiving

russellsanders opened this issue · comments

Day after Thanksgiving does not always get calculated to the date following Thanksgiving. If the first day of the month falls on a Friday the the current calculation of the 4th Friday doesn't work and ends up being the week before Thanksgiving. It really should be calculated as the 4th Thursday + 1 day

> Holidays.between(Date.new(2013, 11, 01), Date.new(2013, 11, 30), :us_ca, :us, :informal)
=> [{:date=>Mon, 11 Nov 2013, :name=>"Veterans Day", :regions=>[:us]}, {:date=>Fri, 22 Nov 2013, :name=>"Day after Thanksgiving", :regions=>[:us_ca]}, {:date=>Thu, 28 Nov 2013, :name=>"Thanksgiving", :regions=>[:us]}]

Thank you for the PR! I've merged so I'll close this out.