note 102642 rejected from function.strftime by danbrown
| From: | danbrown@php.net | Date: | Fri, 25 Feb 2011 17:16:09 +0000 |
| Subject: | note 102642 rejected from function.strftime by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-177340@lists.php.net to get a copy of this message | ||
Note Submitter: thepaw at arcor dot de
----
@Lemmi and all .. how can I fix the "März" Problem in this Code ??
<?php
$tage = 30; // Zeige die Geburtstage der naechsten X-Tage an
$ausgabe = "";
$geburtstage = file("geburtstage.txt");
setLocale(LC_ALL, "de_DE", "german");
for ($zaehler = 0; $zaehler <= $tage; $zaehler++) {
$aktuell = date("d.m.Y", strtotime("+" . $zaehler . " day", time()));
list($tag, $monat, $jahr) = explode(".", $aktuell);
foreach ($geburtstage as $geburtstag) {
list($name, $tag2, $monat2, $jahr2) = explode("|", $geburtstag);
if ($tag2 == $tag && $monat2 == $monat) {
$ausgabe .= "<b>$name</b> (" . ($jahr - $jahr2) . ")<br>" .
strftime("%d. %B $jahr2", mktime(0, 0, 0, $monat, $tag)) .
"<br><br>";
}
}
}
if ($ausgabe != "") {
echo "Geburtstage in den<br>nächsten " . $tage . "
Tagen:<br><br>" . $ausgabe;
}
else {
echo "In den nächsten " . $tage . " Tagen<br>hat niemand
Geburtstag!<br><br>";
}
?>
Thanks
ThePaw