Hi all I need to format date exactly like this Dienstag 28. September 2010, 15:00 Uhr
(German words), what is the best way? Thanks.
I guess I have to use d开发者_JAVA百科ate function but how to compose format
date()
won´t be able to get you a German text, you will have to use strftime()
Example:
setlocale(LC_TIME, "de_DE");
strftime("%A %e. %B %Y, %H:%M Uhr", $your_date);
setlocale
and strftime
setlocale(LC_TIME, 'de_DE@euro', 'de_DE', 'de', 'ge');
echo strftime("%A %d %B %Y, %H:%M");
You can set your language in PHP with setlocale() and then use strftime() with the corresponding format. That will allow you to get german output.
精彩评论