From 1208c086288144efdf980e35efc4af961d20be96 Mon Sep 17 00:00:00 2001 From: Benjamin Oris Jr Date: Tue, 10 Apr 2012 15:39:26 +0800 Subject: [PATCH] Fix holiday method. --- lib/calendar.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/calendar.rb b/lib/calendar.rb index 995bf7a..a1c64eb 100644 --- a/lib/calendar.rb +++ b/lib/calendar.rb @@ -40,7 +40,8 @@ def no_work?(date) def holiday?(date) date = to_date(date) - HOLIDAYS.include?(date) + holidays = HOLIDAYS.map {|h| to_date(h)} + holidays.include?(date) end def weekend?(date)