Re: Monat ohne fuehrende Null

Michael Wenger <[email protected]>
Newsgroups gmane.linux.suse.programming
Message-ID <[email protected]>
Hallo Heinz!

Heinz W. Pahlke schrieb am 05.10.2004 15:29 :
> print strftime "%e. %B %Y", localtime($(WML_SRC_TIME));

Diese Zeile würde ich intuitiv durch diese Zeilen ersetzen:

my ($localday, $localmonth, $localyear) =
     split(/::/, strftime("%e::%B::%Y", localtime($(WML_SRC_TIME))));

# fuehrende Null vom Monat entfernen
if(substr($localmonth, 0, 1) eq "0") {
   $localmonth = substr($localmonth, 1);
}

print $localday, ". ", $localmonth, " ", $localyear,
localtime($(WML_SRC_TIME));


Ich habe das jetzt mal schnell niedergeschrieben, ohne es zu testen. Das 
Testen überlasse ich dir ;-)

Gruß,
Michael

-- 
Um die Liste abzubestellen, schicken Sie eine Mail an:
    [email protected]
Um eine Liste aller verfügbaren Kommandos zu bekommen, schicken
Sie eine Mail an: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.