note 56557 deleted from function.date by tularis
| From: | tularis@php.net | Date: | Thu, 09 Feb 2012 21:07:34 +0000 |
| Subject: | note 56557 deleted from function.date by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-186041@lists.php.net to get a copy of this message | ||
Note Submitter: webmaster [AT] gn-solutions [DOT] de
----
For users who want a different language than english, you can user strftime() function in
combination with setlocale() instead of date():
e.g. for german language:
With date you would write:
<?php
echo date('l, d. F Y'); //Output: Wednesday, 07. September 2005
?>
With strftime() you can output it in german like this:
<?php
// Set the gloabal LC_TIME constant to german
setlocale(LC_TIME, 'de_DE');
// Little bit other Syntax but better effect
echo strftime('%A, %d. %B %Y'); //Output: Mittwoch, 07. September 2005
?>
Greetings, Andy!