From: fox_two <> Date: Mon, 4 Jun 2001 12:28:51 +0000 (+0000) Subject: month(): returns month name for a specified number. X-Git-Url: https://git.p6c8.net/selfforum.git/commitdiff_plain/4b55d37edde15226caac8bc1876d8d9e798587db?ds=sidebyside month(): returns month name for a specified number. --- diff --git a/selfforum-cgi/shared/Posting/_lib.pm b/selfforum-cgi/shared/Posting/_lib.pm index 9a53307..dfac468 100644 --- a/selfforum-cgi/shared/Posting/_lib.pm +++ b/selfforum-cgi/shared/Posting/_lib.pm @@ -5,7 +5,7 @@ package Posting::_lib; # File: shared/Posting/_lib.pm # # # # Authors: André Malo , 2001-03-03 # -# Frank Schoenmann , 2001-03-13 # +# Frank Schoenmann , 2001-06-02 # # # # Description: Message access interface, time format routines # # # @@ -295,7 +295,7 @@ sub parse_xml_file ($) { my $xml = eval { local $SIG{__DIE__}; # CGI::Carp works unreliable ;-( - new XML::DOM::Parser (KeepCDATA => 1) -> parsefile ($file); + new XML::DOM::Parser(KeepCDATA => 1)->parsefile ($file); }; return if ($@); @@ -704,7 +704,7 @@ sub save_file ($$) ########################### sub hr_time ($) { - my @month = (qw(Januar Februar), "M\303\244rz", qw(April Mail Juni Juli August September Oktober November Dezember)); + my @month = (qw(Januar Februar), "M\303\244rz", qw(April Mai Juni Juli August September Oktober November Dezember)); # ^^^^^^^^ - UTF8 # my (undef, $min, $hour, $day, $mon, $year) = localtime ($_[0]); @@ -719,7 +719,7 @@ sub short_hr_time ($) { } sub long_hr_time ($) { - my @month = (qw(Januar Februar), "M\303\244rz", qw(April Mail Juni Juli August September Oktober November Dezember)); + my @month = (qw(Januar Februar), "M\303\244rz", qw(April Mai Juni Juli August September Oktober November Dezember)); # ^^^^^^^^ - UTF8 # my @wday = qw(Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag); @@ -728,9 +728,16 @@ sub long_hr_time ($) { sprintf ('%s, %02d. %s %04d, %02d:%02d:%02d Uhr', $wday[$wday], $day, $month[$mon], $year+1900, $hour, $min, $sek); } +sub month($) { + my @month = (qw(Januar Februar), "M\303\244rz", qw(April Mai Juni Juli August September Oktober November Dezember)); + # ^^^^^^^^ - UTF8 # + + return $month[$_[0]]; +} + # ==================================================== # Modulinitialisierung # ==================================================== # making require happy -1; \ No newline at end of file +1;