From 05c41b52761a5e6d1ab54d17b619bd80bdd14cac Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sun, 13 Oct 2002 20:27:57 +0000 Subject: [PATCH] Fixed a bug that occured when trying to retrieve the name of a day from DateTime. --- lib/WebGUI/DateTime.pm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/WebGUI/DateTime.pm b/lib/WebGUI/DateTime.pm index 0d07e45b0..80d56153d 100644 --- a/lib/WebGUI/DateTime.pm +++ b/lib/WebGUI/DateTime.pm @@ -302,20 +302,19 @@ sub getMonthName { sub getDayName { my $day = $_[0]; - $day++; - if ($day == 1) { + if ($day == 7) { return WebGUI::International::get(27); - } elsif ($day == 2) { + } elsif ($day == 1) { return WebGUI::International::get(28); - } elsif ($day == 3) { + } elsif ($day == 2) { return WebGUI::International::get(29); - } elsif ($day == 4) { + } elsif ($day == 3) { return WebGUI::International::get(30); - } elsif ($day == 5) { + } elsif ($day == 4) { return WebGUI::International::get(31); - } elsif ($day == 6) { + } elsif ($day == 5) { return WebGUI::International::get(32); - } elsif ($day == 7) { + } elsif ($day == 6) { return WebGUI::International::get(33); } }