# File: shared/Posting/_lib.pm #
# #
# Authors: André Malo <nd@o3media.de>, 2001-03-03 #
-# Frank Schoenmann <fs@tower.de>, 2001-03-13 #
+# Frank Schoenmann <fs@tower.de>, 2001-06-02 #
# #
# Description: Message access interface, time format routines #
# #
hr_time
short_hr_time
long_hr_time
+ month
get_all_threads
create_forum_xml_string
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 ($@);
my ($last_thread, $last_message, $dtd, @unids, %threads);
local (*FILE, $/);
- open FILE, $file or return undef;
+ open FILE,"< $file" or return;
my $xml = join '', <FILE>;
- close(FILE) or return undef;
+ close(FILE) or return;
if (wantarray)
{
###########################
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]);
}
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);
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;