Skip to content

Commit

Permalink
Fix #25 MLK/Robert E. Lee holidays in Georgia
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanss committed Sep 4, 2016
1 parent 4185c8e commit 731f8d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions holidays.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,7 @@ def _populate(self, year):
name = "Robert E. Lee's Birthday"
elif self.state == 'ID' and year >= 2006:
name = "Martin Luther King, Jr. - Idaho Human Rights Day"
if self.state != 'GA' or year < 2012:
self[date(year, 1, 1) + rd(weekday=MO(+3))] = name
self[date(year, 1, 1) + rd(weekday=MO(+3))] = name

# Lincoln's Birthday
name = "Lincoln's Birthday"
Expand Down Expand Up @@ -1018,7 +1017,7 @@ def _populate(self, year):
self[dt + rd(days=+1)] = name

# Robert E. Lee's Birthday
if self.state == 'GA' and year >= 2012:
if self.state == 'GA' and year >= 1986:
name = "Robert E. Lee's Birthday"
self[date(year, 11, 29) + rd(weekday=FR(-1))] = name

Expand Down
5 changes: 3 additions & 2 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1552,8 +1552,9 @@ def test_thanksgiving_day(self):

def test_robert_lee_birthday(self):
ga_holidays = holidays.US(state='GA')
self.assertFalse(date(2011, 11, 25) in ga_holidays)
for dt in [date(2013, 11, 29), date(2014, 11, 28), date(2015, 11, 27),
self.assertFalse(date(1985, 11, 25) in ga_holidays)
for dt in [date(2007, 11, 23), date(2008, 11, 28), date(2010, 11, 26),
date(2013, 11, 29), date(2014, 11, 28), date(2015, 11, 27),
date(2018, 11, 23), date(2019, 11, 29), date(2020, 11, 27)]:
self.assertFalse(dt in self.holidays)
self.assertTrue(dt in ga_holidays)
Expand Down

0 comments on commit 731f8d2

Please sign in to comment.