From 064148499917d67a7b478b84681b31a2b1e31d99 Mon Sep 17 00:00:00 2001 From: Dirk Grambow Date: Wed, 2 Dec 2009 12:04:51 +0100 Subject: [PATCH] Removed unnecessary additions --- lib/holidays.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/holidays.rb b/lib/holidays.rb index 5eef2f4..fa91e84 100644 --- a/lib/holidays.rb +++ b/lib/holidays.rb @@ -392,13 +392,13 @@ class Date # :first, :second, :third, :fourth or :fifth if week > 0 - return ((week - 1) * 7) + 1 + ((7 + wday - Date.civil(year, month,(week-1)*7 + 1).wday) % 7) + return ((week - 1) * 7) + 1 + ((wday - Date.civil(year, month,(week-1)*7 + 1).wday) % 7) end days = MONTH_LENGTHS[month-1] days = 29 if month == 2 and Date.leap?(year) - return days - ((Date.civil(year, month, days).wday - wday + 7) % 7) + return days - ((Date.civil(year, month, days).wday - wday) % 7) end end \ No newline at end of file