note 15003 deleted from function.date by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 01:12:05 +0000 |
| Subject: | note 15003 deleted from function.date by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20098@lists.php.net to get a copy of this message | ||
<br>This is an example for GERMAN date and month in one string plus time setup for +6 hour
difference between US and Germany:
<?PHP
// a list with the days of a week
$TAGE = array ("Sonntag", "Montag", "Dienstag", "Mittwoch",
"Donnerstag", "Freitag", "Samstag");
// a list with the month of a year
$MONATE = array ("Januar", "Februar", "März", "April",
"Mai", "Juni", "Juli", "August", "September",
"Oktober", "November", "Dezember");
// what is the day of the week in number and name
$TAG=date("w",time()+21600);
$WTAG=date("d",time()+21600);
// what is the month of the year in name
$MONAT=date("n");
// what is the year in four digits
$JAHR=date("Y");
// Here is the result
echo $TAGE[$TAG]." | ".$WTAG.".".$MONATE[$MONAT].", ".$JAHR;
?>
Results looks like e.g.:
Freitag | 24.September, 2001<br>